def get_LEA_seq_consensus_seqs(fwd_read_f, rev_read_f, map_f, output_dir, barcode_type, barcode_len, barcode_correction_fn, max_barcode_errors, min_consensus, max_cluster_ratio, min_difference_in_bcs, fwd_length, rev_length, min_reads_per_random_bc, min_difference_clusters, barcode_column, reverse_primer_column):
 (bc_to_sid, bc_to_fwd_primers, bc_to_rev_primers) = process_mapping_file(map_f, barcode_len, barcode_type, barcode_column, reverse_primer_column)
 (random_bc_lookup, random_bc_reads, random_bcs, barcode_errors_exceed_max_count, barcode_not_in_map_count, primer_mismatch_count, seq_too_short_count, input_seqs_count, total_seqs_kept) = read_fwd_rev_read(fwd_read_f, rev_read_f, bc_to_sid, barcode_len, barcode_correction_fn, bc_to_fwd_primers, bc_to_rev_primers, max_barcode_errors, fwd_length, rev_length)
 consensus_seq_lookup = get_consensus_seqs_lookup(random_bc_lookup, random_bc_reads, random_bcs, min_difference_in_bcs, min_reads_per_random_bc, output_dir, min_difference_clusters, max_cluster_ratio, min_consensus)
 log_out = format_lea_seq_log(input_seqs_count, barcode_errors_exceed_max_count, barcode_not_in_map_count, primer_mismatch_count, seq_too_short_count, total_seqs_kept)
 return (consensus_seq_lookup, log_out)

def get_LEA_seq_consensus_seqs ( fwd_read_f , rev_read_f , map_f , output_dir , barcode_type , barcode_len , barcode_correction_fn , max_barcode_errors , min_consensus , max_cluster_ratio , min_difference_in_bcs , fwd_length , rev_length , min_reads_per_random_bc , min_difference_clusters , barcode_column , reverse_primer_column ) : ( bc_to_sid , bc_to_fwd_primers , bc_to_rev_primers ) = process_mapping_file ( map_f , barcode_len , barcode_type , barcode_column , reverse_primer_column ) ( random_bc_lookup , random_bc_reads , random_bcs , barcode_errors_exceed_max_count , barcode_not_in_map_count , primer_mismatch_count , seq_too_short_count , input_seqs_count , total_seqs_kept ) = read_fwd_rev_read ( fwd_read_f , rev_read_f , bc_to_sid , barcode_len , barcode_correction_fn , bc_to_fwd_primers , bc_to_rev_primers , max_barcode_errors , fwd_length , rev_length ) consensus_seq_lookup = get_consensus_seqs_lookup ( random_bc_lookup , random_bc_reads , random_bcs , min_difference_in_bcs , min_reads_per_random_bc , output_dir , min_difference_clusters , max_cluster_ratio , min_consensus ) log_out = format_lea_seq_log ( input_seqs_count , barcode_errors_exceed_max_count , barcode_not_in_map_count , primer_mismatch_count , seq_too_short_count , total_seqs_kept ) return ( consensus_seq_lookup , log_out )
reads mapping file .