rnalysis.fastq.sam_to_fastq_single
- rnalysis.fastq.sam_to_fastq_single(input_folder: Union[str, Path], output_folder: Union[str, Path], picard_installation_folder: Union[str, Path, Literal['auto']] = 'auto', new_sample_names: Union[List[str], Literal['auto']] = 'auto', re_reverse_reads: bool = True, include_non_primary_alignments: bool = False, quality_trim: Optional[PositiveInt] = None)
Convert SAM/BAM files to FASTQ files using Picard SamToFastq.
- Parameters
input_folder (str or Path) – Path to the folder containing the SAM/BAM files you want to convert.
output_folder (str or Path) – Path to a folder in which the converted FASTQ files will be saved.
picard_installation_folder (str, Path, or 'auto' (default='auto')) – Path to the installation folder of Picard. For example: ‘C:/Program Files/Picard’
new_sample_names (list of str or 'auto' (default='auto')) – Give a new name to each converted sample (optional). If sample_names=’auto’, sample names will be given automatically. Otherwise, sample_names should be a list of new names, with the order of the names matching the order of the files in the directory.
re_reverse_reads (bool (default=True)) – Re-reverse bases and qualities of reads with the negative-strand flag before writing them to FASTQ.
include_non_primary_alignments (bool (default=False)) – If true, include non-primary alignments in the output. Support of non-primary alignments in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and there are paired reads with non-primary alignments.
quality_trim (positive int or None (default=None)) – If enabled, End-trim reads using the phred/bwa quality trimming algorithm and this quality.
- Returns
a list of the paths to the generated FASTQ files.
- Return type
list of str