# Tbl2prod

> Use when converting `spdi2tbl`-style variant rows into reference and altered product sequences for coding or protein variants.

- Skill: `vimalinx/tbl2prod` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds add vimalinx/tbl2prod`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vimalinx/tbl2prod/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vimalinx (https://skillmd.com/u/vimalinx)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/vimalinx/tbl2prod

---


# 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

```bash
# Full dbSNP-to-product pipeline
efetch -db snp -id 104894914 -format docsum | snp2hgvs | hgvs2spdi | spdi2tbl | tbl2prod
```

```bash
# Feed a prepared spdi2tbl-style table
cat variants.tsv | tbl2prod
```

```bash
# Save the resulting product table
cat variants.tsv | tbl2prod > products.tsv
```

## Recommended Workflow

1. Feed `tbl2prod` the exact 8-column tabular rows produced by `spdi2tbl` or an equivalent generator.
2. Expect only coding and protein variants to survive; genomic rows are skipped.
3. Capture the three-column output and compare the reference (`:+`) and altered (`:ins`) definitions as needed.
4. 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`.

