MetaSnek API
fastq_finder.py
convert_to_dictionary(paired_reads, unpaired_reads)
Converts paired and unpaired reads to a single dictionary.
Parameters: |
|
---|
Returns: |
|
---|
parse_directory(file_list, r1_flags=['_R1.', '_R1_', '.R1.', '.R1_', '_1_', '_1.', '.1.', '.1_'], r2_flags=['_R2.', '_R2_', '.R2.', '.R2_', '_2_', '_2.', '.2.', '.2_'], ext_pattern='.(fasta|fastq|fq)(.gz)?$')
Pairs samples from a list of files.
Parameters: |
|
---|
Returns: |
|
---|
parse_samples(input_file_or_directory)
Work out if filepath is a file or directory and run appropriate parser
Parameters: |
|
---|
Returns: |
|
---|
parse_samples_to_dictionary(input_file_or_directory)
Convenience function to parse the samples directory or TSV and return the samples dictionary
Parameters: |
|
---|
Returns: |
|
---|
parse_tsv_file(file_path)
Parses a 2-4 column TSV file of sample names and sequencing reads (column 3/4 is optional)
Parameters: |
|
---|
Returns: |
|
---|
write_samples_tsv(dictionary, output_file)
Write the samples dictionary to a TSV file
Args:one dictionary: - sample name (dict): - R1 (str): filepath of R1 reads file - R2 (str): filepath of R2 reads file or None - S (str): filepath of singleton reads file or None output_file (str): filepath of output file for writing