download-and-filter
Route NCBI genome download requests through the ncbi-genome-download CLI or Python API, selecting the correct section, group, format, assembly and taxonomy filters before a verified dry run.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- download-and-filter
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route NCBI genome download requests through the ncbi-genome-download CLI or Python API, selecting the correct section, group, format, assembly and taxonomy filters before a verified dry run.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md8.0 KB
- 参考文档references/cli-reference.md7.5 KB
- 参考文档references/filtering-and-data.md8.2 KB
- 参考文档references/troubleshooting.md7.6 KB
03 SKILL.md 正文
Download and filter
Use this sub-skill when the user wants to download NCBI assembly files, preview
which assemblies match a request, or construct/test the equivalent Python API
call. It owns candidate selection, CLI parsing, NgdConfig validation, and
filter semantics. It does not own checksum validation, resume/output-tree
repair, symlink layout, or metadata-table column details.
Route first
-
Establish the NCBI
section(refseqorgenbank) and one or moregroups. The RefSeq section does not acceptmetagenomes; use--section genbank metagenomes(or the equivalent API keywords). The positional CLI group is required even though the help text describes analldefault. -
Select formats, assembly levels, RefSeq categories, and candidate filters. Lists are comma-separated with no spaces after commas. Read the exact flags and combinations in the CLI reference and the filter/file rules in filtering-and-data.md.
-
Run a dry run before downloading genome payloads. For example:
ngd --section refseq --formats fasta \ --assembly-levels complete,chromosome \ --genera Streptomyces --dry-run bacteriaExpected output starts with
Considering the following N assemblies for download:and then prints accession, organism name, and extracted strain columns separated by tabs. A dry run still obtains/parses the assembly summary (possibly from cache), so it is not a promise of zero network I/O; it prevents genome-file download jobs. -
Only after the candidate list is plausible, remove
--dry-runand choose the output/checksum/resume behavior with output-and-integrity. Use taxonomy-helper only when a taxonomy-tree expansion is requested; it is not part of ordinary exact TaxID filtering.
Entry points and API
Both installed console commands are equivalent:
ncbi-genome-download --help
ngd --version
The public imports are download, args_download, argument_parser, and
NgdConfig:
from ncbi_genome_download import NgdConfig, argument_parser, args_download, download
# API calls use Python keyword names and return an integer status.
status = download(
section="refseq",
groups="bacteria",
file_formats="fasta,assembly-report",
assembly_levels="complete",
dry_run=True,
)
parser = argument_parser(version="0.3.4")
status = args_download(parser.parse_args(["--dry-run", "bacteria"]))
Read api-reference.md before translating a CLI
request to Python: output and file_formats are API names, and CLI-only
--retries, --verbose, and --debug are not download(**kwargs) settings.
Operating checks
- Confirm section/group compatibility and exact spelling before the first summary request.
- Confirm every comma-separated value has no whitespace after the comma and that quoted values containing spaces are intentional.
- Prefer exact genus-prefix, strain, TaxID, species-TaxID, and accession
filters; enable
--fuzzy-genusonly for a case-insensitive substring search in NCBI'sorganism_name, and--fuzzy-accessionsonly for accession-prefix matching. - Treat all candidate filters as an intersection. A zero-match result returns
status
1and logsNo downloads matched your filter. Please check your options.; do not infer that NCBI has no data until the dry-run filters and section are checked. - A successful dry run returns
0; a normal completed call returns0. Connection or chunked-transfer failures return75and should be handled by the CLI retry loop described in troubleshooting.md.
For invalid values, deprecated aliases, cache surprises, and network failures, use troubleshooting.md. Link every output, checksum, resume, symlink, and metadata serialization question to output-and-integrity, rather than re-documenting it here.
Local references
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).