FastqResult#

class biotite.application_v2.sra.FastqResult(file_paths: list[Path], _temp_dir: TemporaryDirectory[str] | None = None)[source]#

Bases: object

The result of a FASTQ extraction with FastqDumpApp.extract_fastq().

The parsed files and sequences are not kept in memory, but are read from file_paths on demand via get_files(), get_sequences() and get_sequences_and_scores().

Attributes:
file_pathslist of Path

The paths to the extracted FASTQ files. There is one file per read in a spot.

get_files(offset: int | Literal['Sanger', 'Solexa', 'Illumina-1.3', 'Illumina-1.5', 'Illumina-1.8'] = 'Sanger') → list[FastqFile]#

Parse the extracted FASTQ files.

Parameters:
offsetint or {‘Sanger’, ‘Solexa’, ‘Illumina-1.3’, ‘Illumina-1.5’, ‘Illumina-1.8’}, optional

This value is subtracted from the FASTQ ASCII code to obtain the quality score.

Returns:
fileslist of FastqFile

The parsed FASTQ files, one per read in a spot.

get_sequences(offset: int | Literal['Sanger', 'Solexa', 'Illumina-1.3', 'Illumina-1.5', 'Illumina-1.8'] = 'Sanger') → list[dict[str, NucleotideSequence]]#

Get the reads from the extracted FASTQ files.

Parameters:
offsetint or {‘Sanger’, ‘Solexa’, ‘Illumina-1.3’, ‘Illumina-1.5’, ‘Illumina-1.8’}, optional

This value is subtracted from the FASTQ ASCII code to obtain the quality score.

Returns:
sequenceslist of dict (str -> NucleotideSequence)

The reads for each spot: the first item contains the first read for each spot, the second item the second read, etc. Each item maps identifiers to their sequence.

get_sequences_and_scores(offset: int | Literal['Sanger', 'Solexa', 'Illumina-1.3', 'Illumina-1.5', 'Illumina-1.8'] = 'Sanger') → list[dict[str, tuple[NucleotideSequence, ndarray]]]#

Get the reads and quality scores from the extracted FASTQ files.

Parameters:
offsetint or {‘Sanger’, ‘Solexa’, ‘Illumina-1.3’, ‘Illumina-1.5’, ‘Illumina-1.8’}, optional

This value is subtracted from the FASTQ ASCII code to obtain the quality score.

Returns:
sequences_and_scoreslist of dict (str -> tuple(NucleotideSequence, ndarray))

Like the result of get_sequences(), but each value additionally contains the quality scores.