id = "sratoolkit"
name = "SRA Toolkit"
homepage = "https://github.com/ncbi/sra-tools"
description = "A toolkit for using data in the INSDC Sequence Read Archives."
executables = ["prefetch", "fasterq-dump", "vdb-config"]
[dotfiles]
paths = ["~/.ncbi/user-settings.mkfg"]
secret = []
[commands]
format = 1
label = "Download SRA accessions (prefetch)"
description = "Download one or more SRA run accessions with prefetch, resumable on failure. Only prefetch is covered; fasterq-dump and vdb-config have no form."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "wiki"
kind = "manual"
url = "https://github.com/ncbi/sra-tools/wiki/08.-prefetch-and-fasterq-dump"
revision = "2026-10-27"
evidence = """
$prefetch SRR000001 -O /path/to/be/used
Make sure the last directory of /path/to/be/used is the accession itself.
$prefetch SRR1951777 --max-size 420000000000
kilobytes (default): --max-size 10 == --max-size 10k : 10 kilobytes,
megabytes: --max-size 10m : 10 megabytes,
gigabytes: --max-size 10g : 10 gigabytes,
terabytes: --max-size 10t : 10 terabytes,
unlimited: --max-size u.
If prefetch fails - run the same prefetch command again and the download will resume.
"""
[[commands.field]]
id = "accessions"
label = "Accessions"
description = "SRA run accessions such as SRR000001."
type = "string"
position = 0
min = 1
multiple = true
sources = ["wiki"]
[[commands.field]]
id = "output_dir"
label = "Output directory"
description = "The last directory should be named after the accession."
type = "path"
option = ["-O"]
path = { kind = "directory", role = "output" }
sources = ["wiki"]
[[commands.field]]
id = "max_size"
label = "Maximum download size"
description = "Default limit is 20G. Suffixes k, m, g, t; u means unlimited."
type = "string"
option = ["--max-size"]
suggestions = [{ value = "u", label = "Unlimited" }, { value = "100g", label = "100 GB" }]
sources = ["wiki"]
[[commands.task]]
id = "download"
label = "Download accessions"
fields = ["accessions", "output_dir"]
required = ["accessions"]
[[commands.task]]
id = "large"
label = "Download a large accession"
fields = ["accessions", "max_size", "output_dir"]
required = ["accessions", "max_size"]
set = { max_size = ["u"] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["accessions", "output_dir"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["max_size"]