bio-sra-data
БесплатноЗапускает вложенные скриптыНе проверенDownload sequencing data from NCBI SRA using the SRA toolkit. Use when downloading FASTQ files from SRA accessions, prefetching large datasets, or validating…
от FridrichMethod★ 17 звёзд на GitHubОб этом скилле
SRA Data
Download raw sequencing data from the Sequence Read Archive using the SRA toolkit.
Installation
# macOS
brew install sratoolkit
# Ubuntu/Debian
sudo apt install sra-toolkit
# conda (recommended)
conda install -c bioconda sra-tools
# Verify installation
fasterq-dump --version
Core Commands
fasterq-dump - Download FASTQ (Recommended)
Fast, multithreaded FASTQ extraction. Preferred over fastq-dump.
# 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 |
# 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/
prefetch - Download SRA Files First
For large files or unreliable connections, prefetch first, then convert.
# 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 |
# 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
vdb-validate - Verify Downloads
Check integrity of downloaded SRA files.
# Validate a downloaded file
vdb-validate SRR12345678
# Validate with detailed output
vdb-validate SRR12345678 2>&1
sra-stat - Get Run Statistics
Get information about an SRA run without downloading.
# Basic stats
sra-stat --quick SRR12345678
# Detailed XML output
sra-stat --xml SRR12345678
Configuration
vdb-config - Configure SRA Toolkit
Set up cache location and other settings.
# 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
Cache Location
Default: ~/ncbi/ on Linux/macOS
# Create dedicated cache
mkdir -p /data/sra_cache
vdb-config --set /repository/user/main/public/root=/data/sra_cache
Code Patterns
Download Single Run
#!/bin/bash
SRR="SRR12345678"
OUTDIR="./fastq"
mkdir -p $OUTDIR
fasterq-dump $SRR -O $OUTDIR -e 8 -p
Download Multiple Runs
#!/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
Prefetch Then Convert (Large Files)
#!/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
Batch Download Script
#!/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"
Python Wrapper
import subprocess
import os
def download_sra(accession, outdir='.', threads=4, skip_technical=True):
os.makedirs(outdir, exist_ok=True)
cmd = ['fa
Установить bio-sra-data в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
read_filerun_shell_commandВложенные файлы
FAQ
Что делает скилл bio-sra-data?
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.
Как установить скилл bio-sra-data?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-sra-data запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic