Download raw sequencing reads from NCBI SRA. Encodes the source-of-truth decision (SRA-direct vs ENA mirror vs AWS/GCP STRIDES cloud), prefetch --max-size trap (silent 20 GB skip), fasterq-dump uncompressed-scratch trap (~3x final size), --include-technical for 10x single-cell records, MD5 validation, accession hierarchy navigation (SRR/SRX/SRS/SRP/PRJNA), pysradb for metadata, and Aspera deprecation post-2019.
conda install -c bioconda sra-tools # 3.0+
pip install pysradb # optional, for metadata
fasterq-dump --version
For AWS STRIDES, install aws-cli and run from EC2 in us-east-1 for free egress.
"Download SRR12345678 via the ENA mirror (https://ftp.sra.ebi.ac.uk/). It's typically faster than SRA-direct because the FASTQ is pre-compressed -- no SRA->FASTQ conversion needed. Get the md5 from the ENA portal API and verify."
"I have GSE123456 from a GEO paper. Use pysradb gse_to_srp -> srp_to_srr to get all SRR run accessions. Then batch-download them via ENA."
"Use prefetch with --max-size 200G explicitly -- the default 20 GB silently skips larger runs. After prefetch, run vdb-validate and then fasterq-dump."
"This is a 10x v3 record. fasterq-dump with --include-technical --split-files. Expect 3 files: R1 (28-bp barcode+UMI), R2 (cDNA), I1 (sample index). The default (without --include-technical) only gives R2 which is useless for CellRanger."
"I'm running a Nextflow pipeline on AWS Batch in us-east-1. Pull SRA data from s3://sra-pub-run-odp/ with --no-sign-request. Same-region transfer is free."
"fasterq-dump writes uncompressed FASTQ to scratch (~3x final compressed size). My scratch dir has 500 GB free; the run is 200 GB compressed. That's tight -- use fastq-dump --gzip instead, which writes compressed in-place."
--max-size (never the 20 GB default for unknown sizes).vdb-validate (SRA format) or md5sum -c (ENA FASTQ) on every downloaded file.--include-technical.--max-size 20G default silently skips larger runs. Set it generously (200G) or use pysradb metadata to check sizes first.--include-technical to get barcode/UMI reads; without it CellRanger and STARsolo will fail.s3://sra-pub-run-odp/sra/) is free egress in same-region; cross-region pulls incur cost.ascp): NCBI public access retired 2019; ENA public Aspera retired ~2023; institutional accounts still work.efetch -db sra -id <UID> -rettype runinfo gives a CSV; pysradb's metadata is more ergonomic.~/.ncbi/ as a volume so user-settings.mkfg survives container rebuilds.