def run_fasta_checks(input_fasta_fp, mapping_fp, tree_fp=None, tree_subset=False, tree_exact_match=False, same_seq_lens=False, all_ids_found=False, suppress_barcode_checks=False, suppress_primer_checks=False):
 fasta_report = {}
 (sample_ids, barcodes, linkerprimerseqs) = get_mapping_details(mapping_fp, suppress_barcode_checks, suppress_primer_checks)
 fasta_labels = get_fasta_labels(input_fasta_fp)
 total_seq_count = len(fasta_labels)
 (fasta_report['duplicate_labels'], fasta_report['duplicate_ids']) = get_dup_labels_perc(fasta_labels)
 (fasta_report['invalid_labels'], fasta_report['nosample_ids_map']) = check_labels_sampleids(fasta_labels, sample_ids, total_seq_count)
 (fasta_report['invalid_seq_chars'], fasta_report['barcodes_detected'], fasta_report['linkerprimers_detected'], fasta_report['barcodes_at_start']) = check_fasta_seqs(input_fasta_fp, barcodes, linkerprimerseqs, total_seq_count)
 if same_seq_lens:
  fasta_report['same_seq_lens'] = check_fasta_seqs_lens(input_fasta_fp)
 else:
  fasta_report['same_seq_lens'] = False
 if all_ids_found:
  fasta_report['all_ids_found'] = check_all_ids(fasta_labels, sample_ids)
 else:
  fasta_report['all_ids_found'] = False
 if tree_subset:
  fasta_report['tree_subset'] = check_tree_subset(fasta_labels, tree_fp)
 else:
  fasta_report['tree_subset'] = False
 if tree_exact_match:
  fasta_report['tree_exact_match'] = check_tree_exact_match(fasta_labels, tree_fp)
 else:
  fasta_report['tree_exact_match'] = False
 return fasta_report

def run_fasta_checks ( input_fasta_fp , mapping_fp , tree_fp = None , tree_subset = False , tree_exact_match = False , same_seq_lens = False , all_ids_found = False , suppress_barcode_checks = False , suppress_primer_checks = False ) : fasta_report = { } ( sample_ids , barcodes , linkerprimerseqs ) = get_mapping_details ( mapping_fp , suppress_barcode_checks , suppress_primer_checks ) fasta_labels = get_fasta_labels ( input_fasta_fp ) total_seq_count = len ( fasta_labels ) ( fasta_report [ 'duplicate_labels' ] , fasta_report [ 'duplicate_ids' ] ) = get_dup_labels_perc ( fasta_labels ) ( fasta_report [ 'invalid_labels' ] , fasta_report [ 'nosample_ids_map' ] ) = check_labels_sampleids ( fasta_labels , sample_ids , total_seq_count ) ( fasta_report [ 'invalid_seq_chars' ] , fasta_report [ 'barcodes_detected' ] , fasta_report [ 'linkerprimers_detected' ] , fasta_report [ 'barcodes_at_start' ] ) = check_fasta_seqs ( input_fasta_fp , barcodes , linkerprimerseqs , total_seq_count ) if same_seq_lens : fasta_report [ 'same_seq_lens' ] = check_fasta_seqs_lens ( input_fasta_fp ) else : fasta_report [ 'same_seq_lens' ] = False if all_ids_found : fasta_report [ 'all_ids_found' ] = check_all_ids ( fasta_labels , sample_ids ) else : fasta_report [ 'all_ids_found' ] = False if tree_subset : fasta_report [ 'tree_subset' ] = check_tree_subset ( fasta_labels , tree_fp ) else : fasta_report [ 'tree_subset' ] = False if tree_exact_match : fasta_report [ 'tree_exact_match' ] = check_tree_exact_match ( fasta_labels , tree_fp ) else : fasta_report [ 'tree_exact_match' ] = False return fasta_report
returns dictionary of records for different fasta checks input_fasta_fp: fasta filepath mapping_fp: mapping filepath tree_fp: newick tree filepath tree_subset: if true .