Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Download sequencing data from NCBI SRA using the SRA toolkit. Use when downloading FASTQ files from SRA accessions, prefetching large datasets, or validating SRA downloads.
.claude/skills/bio-sra-data/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 187% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 183% | 0% |
| case-07 | ✓→✗ | ▼ Worse | 149% | 0% |
| case-21 | ✓→✗ | ▼ Worse | 268% | 0% |
<!--
#
#
-->
Download raw sequencing data from the Sequence Read Archive using the SRA toolkit.
bash# macOS brew install sratoolkit # Ubuntu/Debian sudo apt install sra-toolkit # conda (recommended) conda install -c bioconda sra-tools # Verify installation fasterq-dump --version
Fast, multithreaded FASTQ extraction. Preferred over fastq-dump.
bash# Download single SRA run as FASTQ fasterq-dump SRR12345678 # Output: SRR12345678.fastq (single-end) # Or: SRR12345678_1.fastq, SRR12345678_2.fastq (paired-end)
Key Options: | Option | Description | Example | |--------|-------------|---------| | -O / --outdir | Output directory | -O ./fastq/ | | -o / --outfile | Output filename | -o sample.fastq | | -e / --threads | Number of threads | -e 8 | | -p / --progress | Show progress bar | -p | | -S / --split-files | Split paired reads (default) | -S | | -3 / --split-3 | Also output unpaired reads | -3 | | --skip-technical | Skip technical reads | --skip-technical | | -t / --temp | Temp directory | -t /tmp | | -f / --force | Overwrite existing | -f |
bash# Common usage with options fasterq-dump SRR12345678 -O ./data/ -e 8 -p --skip-technical # Force split files (paired-end) fasterq-dump SRR12345678 -S -O ./data/
For large files or unreliable connections, prefetch first, then convert.
bash# Prefetch SRA file (downloads .sra to ~/ncbi/sra/) prefetch SRR12345678 # Then convert to FASTQ fasterq-dump ~/ncbi/sra/SRR12345678.sra # Or convert in place fasterq-dump SRR12345678 # Will find prefetched file
Prefetch Options: | Option | Description | |--------|-------------| | -O / --output-directory | Download location | | -p / --progress | Show progress | | -f / --force | Re-download if exists | | --max-size | Max file size (e.g., 50G) | | -X / --max-size | Same as above |
bash# Prefetch with size limit prefetch SRR12345678 --max-size 100G -p # Prefetch multiple accessions prefetch SRR12345678 SRR12345679 SRR12345680 # Prefetch from a list file prefetch --option-file accessions.txt
Check integrity of downloaded SRA files.
bash# Validate a downloaded file vdb-validate SRR12345678 # Validate with detailed output vdb-validate SRR12345678 2>&1
Get information about an SRA run without downloading.
bash# Basic stats sra-stat --quick SRR12345678 # Detailed XML output sra-stat --xml SRR12345678
Set up cache location and other settings.
bash# Interactive configuration vdb-config -i # Set cache directory vdb-config --set /repository/user/main/public/root=/path/to/cache # Check current configuration vdb-config --cfg
Default: ~/ncbi/ on Linux/macOS
bash# Create dedicated cache mkdir -p /data/sra_cache vdb-config --set /repository/user/main/public/root=/data/sra_cache
bash#!/bin/bash SRR="SRR12345678" OUTDIR="./fastq" mkdir -p $OUTDIR fasterq-dump $SRR -O $OUTDIR -e 8 -p
bash#!/bin/bash # From a list of accessions while read SRR; do echo "Downloading $SRR..." fasterq-dump $SRR -O ./fastq/ -e 4 -p done < accessions.txt
bash#!/bin/bash SRR="SRR12345678" # Prefetch first (resumable) prefetch $SRR -p # Validate vdb-validate $SRR # Convert to FASTQ fasterq-dump $SRR -O ./fastq/ -e 8 -p # Optionally remove .sra file rm -f ~/ncbi/sra/${SRR}.sra
bash#!/bin/bash # download_sra.sh - Download multiple SRA runs ACCESSIONS="$1" OUTDIR="${2:-./fastq}" THREADS="${3:-4}" mkdir -p $OUTDIR while read SRR; do if [[ -z "$SRR" ]] || [[ "$SRR" == \#* ]]; then continue fi echo "Processing $SRR..." # Prefetch prefetch $SRR -p -O $OUTDIR # Validate if ! vdb-validate ${OUTDIR}/${SRR}/${SRR}.sra 2>/dev/null; then echo "Validation failed for $SRR, skipping..." continue fi # Convert fasterq-dump ${OUTDIR}/${SRR}/${SRR}.sra -O $OUTDIR -e $THREADS -p # Cleanup .sra rm -rf ${OUTDIR}/${SRR} echo "Completed $SRR" done < "$ACCESSIONS"
pythonimport subprocess import os def download_sra(accession, outdir='.', threads=4, skip_technical=True): os.makedirs(outdir, exist_ok=True) cmd = ['fasterq-dump', accession, '-O', outdir, '-e', str(threads), '-p'] if skip_technical: cmd.append('--skip-technical') result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: raise RuntimeError(f"fasterq-dump failed: {result.stderr}") return result.stdout # Download a run download_sra('SRR12345678', outdir='./data', threads=8)
pythonfrom Bio import Entrez Entrez.email = 'your.email@example.com' def find_sra_runs(term, max_results=100): handle = Entrez.esearch(db='sra', term=term, retmax=max_results) search = Entrez.read(handle) handle.close() if not search['IdList']: return [] handle = Entrez.efetch(db='sra', id=','.join(search['IdList']), rettype='runinfo', retmode='text') runinfo = handle.read() handle.close() # Parse CSV-like output runs = [] for line in runinfo.strip().split('\n')[1:]: if line: fields = line.split(',') if len(fields) > 0: runs.append(fields[0]) # First field is Run accession return runs # Find runs for a project runs = find_sra_runs('PRJNA123456[bioproject]') print(f"Found {len(runs)} runs")
| Prefix | Type | Description | |--------|------|-------------| | SRR | Run | Individual sequencing run | | SRX | Experiment | Experimental design | | SRS | Sample | Biological sample | | SRP | Project/Study | Research project | | PRJNA | BioProject | NCBI BioProject ID | | SAMN | BioSample | NCBI BioSample ID |
Use Run accessions (SRR) with fasterq-dump.
| Error | Cause | Solution | |-------|-------|----------| | item not found | Invalid accession | Check accession exists | | disk full | Insufficient space | Check temp and output dirs | | timeout | Network issues | Use prefetch first | | path not found | Bad output path | Create output directory | | permission denied | Cache permission | Check vdb-config |
| Feature | fasterq-dump | fastq-dump | |---------|--------------|------------| | Speed | Fast (multithreaded) | Slow (single-threaded) | | Memory | Higher | Lower | | Progress | Built-in | None | | Recommended | Yes | Legacy only |
Always prefer fasterq-dump unless memory constrained.
Need SRA sequencing data?
├── Know the SRR accession?
│ └── fasterq-dump SRR... -O ./fastq/ -p
├── Large file (>20GB)?
│ └── prefetch first, then fasterq-dump
├── Multiple runs?
│ └── Loop through accessions or use prefetch --option-file
├── Need to find accessions?
│ └── Search SRA database with Entrez
├── Download interrupted?
│ └── prefetch supports resume
└── Verify integrity?
└── vdb-validate SRR...<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-09 | fail→pass | 5,000 | 2,871 | -43% | 1 | 1 | 0% | 1,066 | 3,063 | +187% | 0 | 0 | — |
case-04 | pass→pass | 4,044 | 2,337 | -42% | 1 | 1 | 0% | 785 | 3,086 | +293% | 0 | 0 | — |
case-01 | fail→pass | 13,029 | 5,526 | -58% | 1 | 1 | 0% | 2,704 | 3,826 | +41% | 0 | 0 | — |
case-02 | pass→pass | 4,442 | 3,482 | -22% | 1 | 1 | 0% | 950 | 3,320 | +249% | 0 | 0 | — |
case-03 | pass→pass | 14,034 | 8,017 | -43% | 1 | 1 | 0% | 2,893 | 4,381 | +51% | 0 | 0 | — |
case-05 | pass→pass | 9,520 | 4,376 | -54% | 1 | 1 | 0% | 1,982 | 3,564 | +80% | 0 | 0 | — |
case-06 | pass→pass | 8,476 | 4,493 | -47% | 1 | 1 | 0% | 1,660 | 3,201 | +93% | 0 | 0 | — |
case-07 | pass→fail | 6,315 | 3,361 | -47% | 1 | 1 | 0% | 1,316 | 3,281 | +149% | 0 | 0 | — |
case-08 | pass→pass | 10,660 | 8,007 | -25% | 1 | 1 | 0% | 2,191 | 4,505 | +106% | 0 | 0 | — |
case-10 | pass→pass | 4,149 | 2,301 | -45% | 1 | 1 | 0% | 801 | 3,019 | +277% | 0 | 0 | — |
case-11 | pass→pass | 2,582 | 2,484 | -4% | 1 | 1 | 0% | 482 | 3,081 | +539% | 0 | 0 | — |
case-12 | pass→pass | 6,948 | 6,385 | -8% | 1 | 1 | 0% | 1,592 | 4,030 | +153% | 0 | 0 | — |
case-13 | pass→pass | 9,158 | 6,094 | -33% | 1 | 1 | 0% | 1,712 | 3,849 | +125% | 0 | 0 | — |
case-14 | pass→pass | 4,492 | 2,910 | -35% | 1 | 1 | 0% | 846 | 3,107 | +267% | 0 | 0 | — |
case-15 | pass→pass | 2,900 | 1,499 | -48% | 1 | 1 | 0% | 446 | 2,810 | +530% | 0 | 0 | — |
case-16 | fail→pass | 5,443 | 2,628 | -52% | 1 | 1 | 0% | 1,084 | 3,063 | +183% | 0 | 0 | — |
case-17 | pass→pass | 6,401 | 2,678 | -58% | 1 | 1 | 0% | 1,101 | 3,152 | +186% | 0 | 0 | — |
case-18 | pass→pass | 13,026 | 5,845 | -55% | 1 | 1 | 0% | 2,192 | 3,638 | +66% | 0 | 0 | — |
case-19 | pass→pass | 3,165 | 2,478 | -22% | 1 | 1 | 0% | 621 | 3,088 | +397% | 0 | 0 | — |
case-20 | pass→pass | 13,679 | 8,780 | -36% | 1 | 1 | 0% | 2,094 | 4,518 | +116% | 0 | 0 | — |
case-21 | pass→fail | 5,324 | 6,443 | +21% | 1 | 1 | 0% | 1,067 | 3,930 | +268% | 0 | 0 | — |
case-22 | pass→pass | 7,200 | 5,134 | -29% | 1 | 1 | 0% | 1,479 | 3,697 | +150% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/26/2026 | +9% |
Other measured skills in the registry, with their headline benchmark lift.