vimalinx/bio-agent / .claude/skills/spdi2tbl
spdi2tbl
VerifiedUse when flattening SPDI XML records into sorted, deduplicated tabular rows for downstream variant pipelines.
spdi2tbl
Tiny Bash wrapper around xtract plus a final sort-table | cut | uniq cleanup. It reads <SPDI> XML, emits variant rows with rsID, accession, position, deleted/inserted sequence, class, type, and gene, then sorts and deduplicates the result.
Quick Start
- Command:
... | spdi2tbl - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/spdi2tbl - Typical upstream:
efetch -db snp ... | snp2hgvs | hgvs2spdi
When To Use This Tool
- Flattening SPDI XML into plain tabular rows
- Bridging from
hgvs2spdiinto shell-friendly TSV output - Producing deduplicated variant tables for later ranking, filtering, or product-sequence generation
- Normalizing dbSNP-derived variant classes into a stable sort order
Common Patterns
# Canonical dbSNP pipeline into a flat table
efetch -db snp -id 104894914 -format docsum | snp2hgvs | hgvs2spdi | spdi2tbl
# Save flattened SPDI rows for downstream use
some_spdi_xml_generator | spdi2tbl > variants.tsv
# Feed directly into tbl2prod
efetch -db snp -id 104894914 -format docsum | snp2hgvs | hgvs2spdi | spdi2tbl | tbl2prod
Recommended Workflow
- Generate real
<SPDI>XML upstream, typically fromhgvs2spdi. - Pipe the XML into
spdi2tbl. - Inspect the resulting 8-column rows before using them downstream.
- Chain into
tbl2prodor other shell filters only after confirming the accession/class mix is what you expect.
Guardrails
- There is no safe local help/version path: both
-hand--versionfell through toxtractand failed withNo data supplied to xtract from stdin or file. - Source inspection shows the class ordering is explicitly transformed as
Genomic=1,Coding=2,Protein=3before sorting. - The wrapper depends on
sort-tablebeing available onPATH. - In live testing on rs104894914, the output rows looked like
rs104894914 NC_000023.11 154191715 T C Genomic Substitution OPN1MW. - Final output is deduplicated with
uniqafter sorting, so repeated equivalent rows are collapsed silently.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 117k | Updated | Claude CodeCodex | Verified | Install |