FastqDumpApp#

class biotite.application_v2.sra.FastqDumpApp(path: PathLike[str] | str = 'fasterq-dump')[source]#

Bases: LocalApp

A handle to fasterq-dump from sra-tools.

The reads can be extracted as FASTQ, i.e. including quality scores, via extract_fastq() or as FASTA via extract_fasta().

Parameters:
pathstr, optional

Path of the fasterq-dump binary.

Notes

According to the sra-tools documentation, running prefetch before fastq-dump ‘is the fastest way to extract FASTQ-files from SRA-accessions’.

Examples

>>> app = FastqDumpApp()
>>> sequences = app.extract_fastq("ERR11344941").result().get_sequences()
extract_fasta(accession: str, prefetch: PrefetchDirectory | None = None, output_path_prefix: PathLike[str] | str | None = None, **kwargs: Any) → CommandSetup[FastaResult]#

Extract the run with the given accession as FASTA.

Parameters:
accessionstr

The accession of the run to be extracted.

prefetchPrefetchDirectory, optional

A directory a previous PrefetchApp downloaded the run into. If not given, the run is downloaded on the fly.

output_path_prefixstr or Path, optional

The prefix of the path to store the extracted FASTA file(s). By default, a temporary directory is used.

**kwargs

Additional command line options.

Returns:
futureFuture of FastaResult

A handle to the running extraction. Call Future.result() to obtain the FastaResult.

extract_fastq(accession: str, prefetch: PrefetchDirectory | None = None, output_path_prefix: PathLike[str] | str | None = None, **kwargs: Any) → CommandSetup[FastqResult]#

Extract the run with the given accession as FASTQ.

Parameters:
accessionstr

The accession of the run to be extracted.

prefetchPrefetchDirectory, optional

A directory a previous PrefetchApp downloaded the run into. If not given, the run is downloaded on the fly.

output_path_prefixstr or Path, optional

The prefix of the path to store the extracted FASTQ file(s). .fastq is appended for a single read per spot, _1.fastq, _2.fastq, etc. for multiple reads per spot. By default, a temporary directory is used.

**kwargs

Additional command line options.

Returns:
futureFuture of FastqResult

A handle to the running extraction. Call Future.result() to obtain the FastqResult.