A script for batch-downloading and automatic compression of data from NCBI Sequence Read Archive. Built on SRA-Toolkit.
Project description
sra-downloader
A script for batch-downloading and automatic compression of data from NCBI Sequence Read Archive. Built on SRA-Toolkit.
Features:
- Downloading SRAs using either accession IDs or NCBI generated files
- Organizing sequences by projects that they come from
- Detecting which runs have been already downloaded
Requirements
- python >= 3.6
- sra-toolkit >= 2.9.6
- pigz
Instalation
1. Conda (recommended, also downloads sra-toolkit)
- Run
conda install -c bioinf-mcb sra-downloader
2. From PyPi
- Run
pip install sra-downloader
3. From sources
- Download a repo into a folder
- Run
pip install .
Usage
usage: sra-downloader [-h] [--fname FILENAME] [--save-dir SAVE_DIRECTORY] [--uncompressed [UNCOMPRESSED]] [sra_id [sra_id ...]]
Download SRA data
positional arguments:
sra_id SRA IDs to download
optional arguments:
-h, --help show this help message and exit
--fname FILENAME CSV file with list of SRAs to download. Header must include `Run` and `BioProject`.
--save-dir SAVE_DIRECTORY
a directory that the files will be saved to. (default: ./downloaded)
--uncompressed [UNCOMPRESSED]
if present, the files will not be compressed. (default: False)
Examples
sra-downloader ERR2177760 --uncompressed
sra-downloader --fname SraRunTable.txt --save-dir ./SRAs
Sample output
└─── save_folder
├── PRJEB14961
│ ├── ERR1551967.sra_1.fastq.gz # - raw read archived files from SRA
│ ├── ERR1551967.sra_2.fastq.gz
│ └── SraRunTable.txt # - original SraRunTable.txt with useful metadata about samples
└── PRJEB20463
├── ERR2177760.sra_1.fastq.gz
├── ERR2177760.sra_2.fastq.gz
├── absent.txt # - entries that were unaccessible due to various reasons
└── SraRunTable.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sra-downloader-1.0.2.tar.gz
(4.6 kB
view hashes)
Built Distributions
Close
Hashes for sra_downloader-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d514d94ad2e1768888b8cf5821f131e88c7ac961d3088f766ecb78c07d369bb9 |
|
MD5 | d1d9e203bc115d82a6d560aa2510acab |
|
BLAKE2b-256 | 623f312e7e88ee095eac38da7f7aa5ebd787252749dd905398be33bc87aacc31 |
Close
Hashes for sra_downloader-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffafe50ff56a78dc1e14af394d635891e045e27095b6a1924a5216bb73ac3c17 |
|
MD5 | 4ae1e55c776e8926ced481e2d35bc9d0 |
|
BLAKE2b-256 | 2a89c390c527468155db3c33eb37b9172b961bd8d7a6129ccd2563677ad3df9a |