download-sra
Skill4 starsChanged 12 days agoMITView on GitHub
Download raw sequencing data from NCBI SRA as FASTQ files using prefetch and fasterq-dump, with support for single accessions, batch lists, and BioProject expansion.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- source-summarizerSkill
- genome-alignment-qcSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-quality-controlSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-cluster-samplesSkill
- stat-compare-multiple-groupsSkill
- stat-compare-two-groupsSkill
- stat-fit-glmSkill
- stat-fit-linear-modelSkill
- stat-learn-bayesian-networkSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 39
If the input is a file, read it line by line (skip blank lines and # comments).
- Very specific: line 40
If the input is a SRP/PRJNA/SRX/SRS accession, expand to SRR list:
- Distinctive: line 45
If the input is an SRR, use it directly.
- Very specific: line 51
Remove the .sra cache unless --original-sra was requested.
- Very specific: line 54
Write manifest.tsv listing: SRR, sample name, R1 path, R2 path (if PE), size (bytes), md5sum.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Download SRA
Use When
- A user wants to download FASTQ files from NCBI SRA given one or more SRR, SRX, SRS, or SRP accessions.
- A user has an accession list file and wants to batch-download all runs.
- A user wants to expand a BioProject (PRJNA) or SRA study (SRP) to its full run list and download all runs.
- A user wants paired-end reads split into R1 and R2 FASTQ files.
- A user wants to control output directory layout, thread count, or compression.
- A user wants to verify download integrity (MD5 / Vdb-validate) after prefetch.
Inputs
- Required:
- one of:
- single SRR/SRX/SRS/SRP/PRJNA accession
- path to a plain-text file of accessions (one per line)
- one of:
- Optional:
--outdir DIR— output directory (default:sra_downloads)--threads N— parallel threads forfasterq-dump(default: 6)--split-3— split paired-end into R1/R2 plus unpaired (default; recommended)--split-files— split into separate files per read (use when--split-3drops unpaired reads)--original-sra— keep the.srafile after conversion (default: deleted)--skip-prefetch— pipe directly throughfasterq-dumpwithout intermediate.sra(uses more temp disk)--gzip— gzip-compress output FASTQ files (default: on)--min-spots N— skip runs with fewer than N spots (default: 0, no filter)--max-size SIZE— skip prefetch if expected size exceeds SIZE bytes--temp-dir DIR— temp directory for fasterq-dump (default: system temp)--no-verify— skip vdb-validate after prefetch
Workflow
- Resolve the input to a list of SRR accessions:
- If the input is a file, read it line by line (skip blank lines and
#comments). - If the input is a SRP/PRJNA/SRX/SRS accession, expand to SRR list:
esearch -db sra -query "<accession>" | efetch -format runinfo | \ awk -F',' 'NR>1 && $1!="" {print $1}' - If the input is an SRR, use it directly.
- If the input is a file, read it line by line (skip blank lines and
- For each SRR in the list, run
scripts/run.sh:prefetch --output-directory "$OUTDIR/sra_cache" "$SRR"to download the.srafile.- Optionally run
vdb-validate "$OUTDIR/sra_cache/$SRR/$SRR.sra"to verify integrity. fasterq-dump --split-3 --threads "$THREADS" --temp "$TMPDIR" --outdir "$OUTDIR/$SRR" "$OUTDIR/sra_cache/$SRR/$SRR.sra".- Gzip the resulting FASTQ files:
pigz -p "$THREADS"orgzip. - Remove the
.sracache unless--original-srawas requested.
- For batch mode (
scripts/batch_run.sh), loop over the accession list sequentially or in parallel controlled by--jobs N(GNU parallel / xargs). - Print a per-run summary: SRR, spots downloaded, output files, size on disk, elapsed time.
- Write
manifest.tsvlisting: SRR, sample name, R1 path, R2 path (if PE), size (bytes), md5sum.
Output Contract
- Per-run output under
<outdir>/<SRR>/:<SRR>_1.fastq.gzand<SRR>_2.fastq.gzfor paired-end (split-3)<SRR>.fastq.gzfor single-end<SRR>_unpaired.fastq.gzfor unpaired reads from split-3 (may be absent or empty)
manifest.tsvin<outdir>/with columns:run,sample,r1,r2,spots,size_bytes,md5_r1,md5_r2- Per-run log files under
<outdir>/logs/<SRR>.log accessions_failed.txtlisting SRRs that could not be downloaded
Limits
- SRA Toolkit (
prefetch,fasterq-dump,vdb-validate) must be installed and on$PATH. fasterq-dumprequires substantial temp disk space (typically 6–10× the compressed FASTQ size); set--temp-dirto a partition with sufficient space.- dbGaP controlled-access data requires a valid ngc token file; pass it as
NCBI_SRA_AUTH_TOKENor viaprefetch --ngc <token.ngc>. - Very large SRA runs (>500 GB) may time out on slow connections; consider using the SRA on AWS (
aws s3 cp s3://sra-pub-run-odp/sra/<SRR>/<SRR>) as an alternative. --split-3is the recommended default for paired-end data; some older SRA entries do not store paired information and will produce single-end output regardless.- Common failure cases:
- insufficient temp disk causing
fasterq-dumpto abort mid-run, leaving partial FASTQ files - rate-limiting or network timeout during
prefetchon large runs; retry with exponential backoff - accession does not exist or has been suppressed by submitter
- mixing SRX/SRS into
fasterq-dumpdirectly without first resolving to SRR accessions
- insufficient temp disk causing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

