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
spdi2tbloutput 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
# Full dbSNP-to-product pipeline
efetch -db snp -id 104894914 -format docsum | snp2hgvs | hgvs2spdi | spdi2tbl | tbl2prod
# Feed a prepared spdi2tbl-style table
cat variants.tsv | tbl2prod
# Save the resulting product table
cat variants.tsv | tbl2prod > products.tsv
Recommended Workflow
- Feed
tbl2prodthe exact 8-column tabular rows produced byspdi2tblor 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
.tblfiles. - It expects tab-delimited rows shaped like
rsid accn ofs del ins cls typ gene; malformed or differently ordered input will misparse silently. -hand--versionare not implemented; with no stdin they simply produce no useful output.- Source inspection shows the script skips
Genomicrows entirely, fetches sequence records withefetch -format gp, and usesgbf2xml,xtract, and severaltransmutetransforms 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 asrs104894914 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.