[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CZ2E4EY2D33S5CB80YST9G":3,"skill-same:01M6CZ2E4EY2D33S5CB80YST9G":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":6,"ownerHtmlUrl":36,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M6CZ2E4EY2D33S5CB80YST9G","download-sra",null,"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.","Scientific-Tooling\u002Fstructured-intelligence","Scientific-Tooling","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F267453265?v=4","01M6CZ1SE6GGD4F67EAQ0PVX38","Scientific Tooling","01M6CZ1SJKCFVGH10Z3A152K02",4,"MIT","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002FSKILL.md",[],[19,20,21,22,23,24,25],"download","download sra","support","batch","data","prefetch","files","2026-11-10 10:12:30",false,"---\nname: download-sra\ndescription: 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.\n---\n\n# Skill: Download SRA\n\n## Use When\n\n- A user wants to download FASTQ files from NCBI SRA given one or more SRR, SRX, SRS, or SRP accessions.\n- A user has an accession list file and wants to batch-download all runs.\n- A user wants to expand a BioProject (PRJNA) or SRA study (SRP) to its full run list and download all runs.\n- A user wants paired-end reads split into R1 and R2 FASTQ files.\n- A user wants to control output directory layout, thread count, or compression.\n- A user wants to verify download integrity (MD5 \u002F Vdb-validate) after prefetch.\n\n## Inputs\n\n- Required:\n  - one of:\n    - single SRR\u002FSRX\u002FSRS\u002FSRP\u002FPRJNA accession\n    - path to a plain-text file of accessions (one per line)\n- Optional:\n  - `--outdir DIR` — output directory (default: `sra_downloads`)\n  - `--threads N` — parallel threads for `fasterq-dump` (default: 6)\n  - `--split-3` — split paired-end into R1\u002FR2 plus unpaired (default; recommended)\n  - `--split-files` — split into separate files per read (use when `--split-3` drops unpaired reads)\n  - `--original-sra` — keep the `.sra` file after conversion (default: deleted)\n  - `--skip-prefetch` — pipe directly through `fasterq-dump` without intermediate `.sra` (uses more temp disk)\n  - `--gzip` — gzip-compress output FASTQ files (default: on)\n  - `--min-spots N` — skip runs with fewer than N spots (default: 0, no filter)\n  - `--max-size SIZE` — skip prefetch if expected size exceeds SIZE bytes\n  - `--temp-dir DIR` — temp directory for fasterq-dump (default: system temp)\n  - `--no-verify` — skip vdb-validate after prefetch\n\n## Workflow\n\n1. Resolve the input to a list of SRR accessions:\n   - If the input is a file, read it line by line (skip blank lines and `#` comments).\n   - If the input is a SRP\u002FPRJNA\u002FSRX\u002FSRS accession, expand to SRR list:\n     ```bash\n     esearch -db sra -query \"\u003Caccession>\" | efetch -format runinfo | \\\n       awk -F',' 'NR>1 && $1!=\"\" {print $1}'\n     ```\n   - If the input is an SRR, use it directly.\n2. For each SRR in the list, run `scripts\u002Frun.sh`:\n   - `prefetch --output-directory \"$OUTDIR\u002Fsra_cache\" \"$SRR\"` to download the `.sra` file.\n   - Optionally run `vdb-validate \"$OUTDIR\u002Fsra_cache\u002F$SRR\u002F$SRR.sra\"` to verify integrity.\n   - `fasterq-dump --split-3 --threads \"$THREADS\" --temp \"$TMPDIR\" --outdir \"$OUTDIR\u002F$SRR\" \"$OUTDIR\u002Fsra_cache\u002F$SRR\u002F$SRR.sra\"`.\n   - Gzip the resulting FASTQ files: `pigz -p \"$THREADS\"` or `gzip`.\n   - Remove the `.sra` cache unless `--original-sra` was requested.\n3. For batch mode (`scripts\u002Fbatch_run.sh`), loop over the accession list sequentially or in parallel controlled by `--jobs N` (GNU parallel \u002F xargs).\n4. Print a per-run summary: SRR, spots downloaded, output files, size on disk, elapsed time.\n5. Write `manifest.tsv` listing: SRR, sample name, R1 path, R2 path (if PE), size (bytes), md5sum.\n\n## Output Contract\n\n- Per-run output under `\u003Coutdir>\u002F\u003CSRR>\u002F`:\n  - `\u003CSRR>_1.fastq.gz` and `\u003CSRR>_2.fastq.gz` for paired-end (split-3)\n  - `\u003CSRR>.fastq.gz` for single-end\n  - `\u003CSRR>_unpaired.fastq.gz` for unpaired reads from split-3 (may be absent or empty)\n- `manifest.tsv` in `\u003Coutdir>\u002F` with columns: `run`, `sample`, `r1`, `r2`, `spots`, `size_bytes`, `md5_r1`, `md5_r2`\n- Per-run log files under `\u003Coutdir>\u002Flogs\u002F\u003CSRR>.log`\n- `accessions_failed.txt` listing SRRs that could not be downloaded\n\n## Limits\n\n- SRA Toolkit (`prefetch`, `fasterq-dump`, `vdb-validate`) must be installed and on `$PATH`.\n- `fasterq-dump` requires substantial temp disk space (typically 6–10× the compressed FASTQ size); set `--temp-dir` to a partition with sufficient space.\n- dbGaP controlled-access data requires a valid ngc token file; pass it as `NCBI_SRA_AUTH_TOKEN` or via `prefetch --ngc \u003Ctoken.ngc>`.\n- Very large SRA runs (>500 GB) may time out on slow connections; consider using the SRA on AWS (`aws s3 cp s3:\u002F\u002Fsra-pub-run-odp\u002Fsra\u002F\u003CSRR>\u002F\u003CSRR>`) as an alternative.\n- `--split-3` is the recommended default for paired-end data; some older SRA entries do not store paired information and will produce single-end output regardless.\n- Common failure cases:\n  - insufficient temp disk causing `fasterq-dump` to abort mid-run, leaving partial FASTQ files\n  - rate-limiting or network timeout during `prefetch` on large runs; retry with exponential backoff\n  - accession does not exist or has been suppressed by submitter\n  - mixing SRX\u002FSRS into `fasterq-dump` directly without first resolving to SRR accessions\n","# Skill: Download SRA\n\n## Use When\n\n- A user wants to download FASTQ files from NCBI SRA given one or more SRR, SRX, SRS, or SRP accessions.\n- A user has an accession list file and wants to batch-download all runs.\n- A user wants to expand a BioProject (PRJNA) or SRA study (SRP) to its full run list and download all runs.\n- A user wants paired-end reads split into R1 and R2 FASTQ files.\n- A user wants to control output directory layout, thread count, or compression.\n- A user wants to verify download integrity (MD5 \u002F Vdb-validate) after prefetch.\n\n## Inputs\n\n- Required:\n  - one of:\n    - single SRR\u002FSRX\u002FSRS\u002FSRP\u002FPRJNA accession\n    - path to a plain-text file of accessions (one per line)\n- Optional:\n  - `--outdir DIR` — output directory (default: `sra_downloads`)\n  - `--threads N` — parallel threads for `fasterq-dump` (default: 6)\n  - `--split-3` — split paired-end into R1\u002FR2 plus unpaired (default; recommended)\n  - `--split-files` — split into separate files per read (use when `--split-3` drops unpaired reads)\n  - `--original-sra` — keep the `.sra` file after conversion (default: deleted)\n  - `--skip-prefetch` — pipe directly through `fasterq-dump` without intermediate `.sra` (uses more temp disk)\n  - `--gzip` — gzip-compress output FASTQ files (default: on)\n  - `--min-spots N` — skip runs with fewer than N spots (default: 0, no filter)\n  - `--max-size SIZE` — skip prefetch if expected size exceeds SIZE bytes\n  - `--temp-dir DIR` — temp directory for fasterq-dump (default: system temp)\n  - `--no-verify` — skip vdb-validate after prefetch\n\n## Workflow\n\n1. Resolve the input to a list of SRR accessions:\n   - If the input is a file, read it line by line (skip blank lines and `#` comments).\n   - If the input is a SRP\u002FPRJNA\u002FSRX\u002FSRS accession, expand to SRR list:\n     ```bash\n     esearch -db sra -query \"\u003Caccession>\" | efetch -format runinfo | \\\n       awk -F',' 'NR>1 && $1!=\"\" {print $1}'\n     ```\n   - If the input is an SRR, use it directly.\n2. For each SRR in the list, run `scripts\u002Frun.sh`:\n   - `prefetch --output-directory \"$OUTDIR\u002Fsra_cache\" \"$SRR\"` to download the `.sra` file.\n   - Optionally run `vdb-validate \"$OUTDIR\u002Fsra_cache\u002F$SRR\u002F$SRR.sra\"` to verify integrity.\n   - `fasterq-dump --split-3 --threads \"$THREADS\" --temp \"$TMPDIR\" --outdir \"$OUTDIR\u002F$SRR\" \"$OUTDIR\u002Fsra_cache\u002F$SRR\u002F$SRR.sra\"`.\n   - Gzip the resulting FASTQ files: `pigz -p \"$THREADS\"` or `gzip`.\n   - Remove the `.sra` cache unless `--original-sra` was requested.\n3. For batch mode (`scripts\u002Fbatch_run.sh`), loop over the accession list sequentially or in parallel controlled by `--jobs N` (GNU parallel \u002F xargs).\n4. Print a per-run summary: SRR, spots downloaded, output files, size on disk, elapsed time.\n5. Write `manifest.tsv` listing: SRR, sample name, R1 path, R2 path (if PE), size (bytes), md5sum.\n\n## Output Contract\n\n- Per-run output under `\u003Coutdir>\u002F\u003CSRR>\u002F`:\n  - `\u003CSRR>_1.fastq.gz` and `\u003CSRR>_2.fastq.gz` for paired-end (split-3)\n  - `\u003CSRR>.fastq.gz` for single-end\n  - `\u003CSRR>_unpaired.fastq.gz` for unpaired reads from split-3 (may be absent or empty)\n- `manifest.tsv` in `\u003Coutdir>\u002F` with columns: `run`, `sample`, `r1`, `r2`, `spots`, `size_bytes`, `md5_r1`, `md5_r2`\n- Per-run log files under `\u003Coutdir>\u002Flogs\u002F\u003CSRR>.log`\n- `accessions_failed.txt` listing SRRs that could not be downloaded\n\n## Limits\n\n- SRA Toolkit (`prefetch`, `fasterq-dump`, `vdb-validate`) must be installed and on `$PATH`.\n- `fasterq-dump` requires substantial temp disk space (typically 6–10× the compressed FASTQ size); set `--temp-dir` to a partition with sufficient space.\n- dbGaP controlled-access data requires a valid ngc token file; pass it as `NCBI_SRA_AUTH_TOKEN` or via `prefetch --ngc \u003Ctoken.ngc>`.\n- Very large SRA runs (>500 GB) may time out on slow connections; consider using the SRA on AWS (`aws s3 cp s3:\u002F\u002Fsra-pub-run-odp\u002Fsra\u002F\u003CSRR>\u002F\u003CSRR>`) as an alternative.\n- `--split-3` is the recommended default for paired-end data; some older SRA entries do not store paired information and will produce single-end output regardless.\n- Common failure cases:\n  - insufficient temp disk causing `fasterq-dump` to abort mid-run, leaving partial FASTQ files\n  - rate-limiting or network timeout during `prefetch` on large runs; retry with exponential backoff\n  - accession does not exist or has been suppressed by submitter\n  - mixing SRX\u002FSRS into `fasterq-dump` directly without first resolving to SRR accessions\n",{"name":5,"description":7},"main","5118e7fda890e9aa819cb71e003cd243d3a31970","skills\u002Fdownload-sra",1,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence","https:\u002F\u002Fgithub.com\u002FScientific-Tooling","2026-11-03 00:01:40",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add Scientific-Tooling\u002Fstructured-intelligence --skill download-sra",{"tool":44,"command":45},"bunx","bunx skills add Scientific-Tooling\u002Fstructured-intelligence --skill download-sra",{"tool":47,"command":48},"pnpm","pnpm dlx skills add Scientific-Tooling\u002Fstructured-intelligence --skill download-sra","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002FSKILL.md",true,[52,58,62,66,70,76],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"agents\u002Fclaude.yaml","REFERENCE","参考文档",306,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002Fagents\u002Fclaude.yaml",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"agents\u002Fopenai.yaml",307,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002Fagents\u002Fopenai.yaml",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"config.yaml",324,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002Fconfig.yaml",{"path":67,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fsra-toolkit.md",2924,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002Freferences\u002Fsra-toolkit.md",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Fbatch_run.sh","SCRIPT","脚本",1439,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002Fscripts\u002Fbatch_run.sh",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Frun.sh",5981,"https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fdownload-sra\u002Fscripts\u002Frun.sh",[81,109,122,134,148,160],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":92,"publishedAt":26},"01M6CZ6S2C54G03K71G77H22KE","structured-intelligence-skill-creator","Create or update repository skills that conform to local templates, provider metadata requirements, registry rules, and validation workflows.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstructured-intelligence-skill-creator\u002FSKILL.md",[87],{"categoryNo":88,"categoryName":89,"taxonomyType":90,"taxonomyTypeDesc":91},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],"structured intelligence skill creator","skill creator","intelligence","structured","create","requirements","workflows","provider","update","registry","local","validation","metadata","repository","templates","Rules",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":26},"01M6CZ6M3JFN400406T1NPWNER","stat-survival-analysis","Estimate and compare survival functions using Kaplan-Meier curves and log-rank test, with optional Cox proportional hazards regression.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-survival-analysis\u002FSKILL.md",[],[116,117,118,119,120,121],"analysis","stat survival analysis","regression","log","functions","test",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":26},"01M6CZ6G5JPDZASM4DRD9QCTEE","stat-pca","Perform PCA on a numeric data matrix to reduce dimensionality, visualize sample structure, and identify top contributing features.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-pca\u002FSKILL.md",[],[129,130,131,132,23,133],"stat pca","sample","visualize","contributing","structure",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":26},"01M6CZ6D9A3N6849BT9VYFSBK5","stat-pairwise-correlation","Compute pairwise correlations and significance tests across all numeric variables, and produce a correlation heatmap.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-pairwise-correlation\u002FSKILL.md",[],[141,142,143,144,145,146,147],"stat pairwise correlation","correlation","produce","heatmap","compute","across","tests",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":26},"01M6CZ69DMF1PDKW83RWARQX6D","stat-nonlinear-embedding","Embed high-dimensional data into 2D using t-SNE or UMAP for exploratory visualization of sample or cell relationships.","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-nonlinear-embedding\u002FSKILL.md",[],[155,156,23,157,130,158,159],"stat nonlinear embedding","visualization","relationships","cell","exploratory visualization",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":166,"publishedAt":26},"01M6CZ65YZGJV40F2FZNH04PBS","stat-logistic-regression","Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).","https:\u002F\u002Fgithub.com\u002FScientific-Tooling\u002Fstructured-intelligence\u002Fblob\u002Fmain\u002Fskills\u002Fstat-logistic-regression\u002FSKILL.md",[],[118,167,168,169,170,171],"stat logistic regression","report","model","outcomes","performance"]