| name | tbl2prod |
| description | Use when converting `spdi2tbl`-style variant rows into reference and altered product sequences for coding or protein variants. |
| disable-model-invocation | true |
| user-invocable | true |
tbl2prod
Pipeline helper that reads 8-column variant rows of the form rsid accn ofs del ins cls typ gene, fetches the referenced nucleotide or protein record from NCBI, and emits reference/product peptide sequences for non-genomic variants.
Quick Start
- Command:
... | tbl2prod
- Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/tbl2prod
- Typical upstream:
... | spdi2tbl
When To Use This Tool
- Translating coding or protein variant rows into actual product sequences
- Extending
spdi2tbl output with reference and altered peptide strings
- Comparing wild-type and mutated products for rsID-derived non-genomic variants
- Staying inside the EDirect shell-tool chain for sequence/product derivation
Common Patterns
efetch -db snp -id 104894914 -format docsum | snp2hgvs | hgvs2spdi | spdi2tbl | tbl2prod
cat variants.tsv | tbl2prod
cat variants.tsv | tbl2prod > products.tsv
Recommended Workflow
- Feed
tbl2prod the exact 8-column tabular rows produced by spdi2tbl or an equivalent generator.
- Expect only coding and protein variants to survive; genomic rows are skipped.
- Capture the three-column output and compare the reference (
:+) and altered (:ins) definitions as needed.
- Use the result for downstream interpretation, not as a generic annotation-file conversion step.
Guardrails
- The old autogenerated description was wrong: this script does not read NCBI feature-table
.tbl files.
- It expects tab-delimited rows shaped like
rsid accn ofs del ins cls typ gene; malformed or differently ordered input will misparse silently.
-h and --version are not implemented; with no stdin they simply produce no useful output.
- Source inspection shows the script skips
Genomic rows entirely, fetches sequence records with efetch -format gp, and uses gbf2xml, xtract, and several transmute transforms internally.
- In live testing on rs104894914, the output included both a reference product row such as
rs104894914 NM_000513.2:688:T:+ <protein> and an altered product row such as rs104894914 NM_000513.2:688:T:C <protein>.
- The final output is sorted and reduced to three columns via
sort-table ... | cut -f 1-2,4.