PrefetchApp#

class biotite.application_v2.sra.PrefetchApp(path: PathLike[str] | str = 'prefetch')[source]#

Bases: LocalApp

A handle to prefetch from sra-tools.

Parameters:
pathstr, optional

Path of the prefetch 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

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

Download the run with the given accession.

Parameters:
accessionstr

The accession of the run to be downloaded.

output_directorystr or Path, optional

The directory the run is downloaded into. By default, a temporary directory is used, that is deleted once the returned PrefetchDirectory is discarded.

**kwargs

Additional command line options.

Returns:
futureFuture of PrefetchDirectory

A handle to the running download. Call Future.result() to obtain the PrefetchDirectory.