tabix-fasta
Guides agents using pysam for tabix compression, tabix indexing, indexed table fetches, BED/GTF/GFF/VCF row parser proxies, BGZF iteration, FASTA random access, FASTQ streaming, and parser or encoding data-format issues.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tabix-fasta
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Guides agents using pysam for tabix compression, tabix indexing, indexed table fetches, BED/GTF/GFF/VCF row parser proxies, BGZF iteration, FASTA random access, FASTQ streaming, and parser or encoding data-format issues.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md7.1 KB
- 参考文档references/data-formats.md5.2 KB
- 参考文档references/troubleshooting.md4.9 KB
- 参考文档references/workflows.md4.4 KB
- 脚本scripts/tabix_fasta_smoke.py4.2 KB
03 SKILL.md 正文
tabix-fasta
Use this sub-skill when a task involves pysam.TabixFile, tabix_compress, tabix_index, tabix_iterator, asTuple, asBed, asGTF, asGFF3, asVCF, FastaFile, legacy Fastafile, FastxFile, FastxRecord, or FASTQ quality streaming.
Read First
references/api-reference.mdfor constructor signatures, fetch/index APIs, parser proxy contracts, and FASTA/FASTQ entry points.references/data-formats.mdfor tabix coordinate columns, BED/GTF/GFF/VCF parser fields, BGZF/index files, encodings, and FASTA/FASTQ assumptions.references/workflows.mdfor compression/index/fetch recipes, parser usage, BGZF iteration, FASTA random access, and FASTQ streaming patterns.references/troubleshooting.mdfor unsorted input, stale indexes, wrong presets or columns, coordinate confusion, plain gzip, parser/encoding failures, overwrite protection, and missing FASTA indexes.scripts/tabix_fasta_smoke.pyfor a source-free smoke helper that creates tiny BED, FASTA, and FASTQ fixtures and prints JSON assertions.
Scope
This sub-skill owns tabix-indexed tabular files and sequence-file helpers: compressing and indexing tabular genomic rows, random-access TabixFile.fetch(), row parser proxies, sequential tabix_iterator(), FastaFile.fetch(), and FastxFile iteration.
Use sibling sub-skills instead for object-oriented VariantFile VCF/BCF workflows, SAM/BAM/CRAM alignment I/O, or invoking samtools/bcftools dispatcher commands.
Defaults that prevent common mistakes
- Use BGZF output from
pysam.tabix_compress()orpysam.tabix_index(); plaingzipfiles are not interchangeable with tabix-indexed BGZF files. - Keep tabix input sorted by contig and start coordinate before indexing; pysam does not sort rows for you.
- Prefer
preset="bed","gff","sam", or"vcf"when the file matches a standard format; otherwise pass explicit 0-based column numbers. - Treat integer
fetch(reference, start, end)arguments as 0-based, half-open intervals; region strings such as"chr1:101-200"use samtools-style coordinates. - For BED, pass
zerobased=Truewhen using explicit columns, or usepreset="bed"; GFF/GTF/VCF/SAM presets handle their own conventional coordinates. - Use
encoding="utf-8"onTabixFileand parser objects when rows can contain non-ASCII text. - Prefer
with pysam.TabixFile(...),with pysam.FastaFile(...), andwith pysam.FastxFile(...)so C-backed handles close promptly.
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).