/omics-skills:bio-interdomain-hgtfrom Omics Skills
Detects and polarizes interdomain horizontal gene transfer using reciprocal hits, genomic context, and ML gene trees. Designed for virus-host gene exchange and endogenous viral elements.
Ships in Omics Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Detect, polarize, and confirm horizontal gene transfer between a query genome (virus, MAG, isolate, or bin) and other domains of life. Built for the common asymmetric case where the query is well annotated but the comparison set is genome-only. Pairs with bio-annotation, the phylogenomics page (VeryFastTree first, then IQ-TREE 3), and bio-viromics (including ViroSync for endogenized viral elements in eukaryotic genomes). Shared pipeline rules: read ../omics-pipeline/SKILL.md first. SKILL_DIR is the directory that holds this SKILL.md.
Run steps in order and record provenance at each step. Steps 0 (database gate) and 5 (frame-aware context guard on eukaryotic DNA) are the most often skipped and most often responsible for wrong calls. Steps 1-4 and 6-8 are in references/workflow.md.
Give every search and tree step an explicit thread count (diamond --threads, VeryFastTree -threads, iqtree3 -T, mafft --thread).
After Steps 0-7 have produced normalized TSVs, apply the evidence gates with the driver (RUN_DIR is results/<date>_<name>/):
uv run --script "$SKILL_DIR/scripts/run_hgt_evidence.py" \
forward_hits.tsv --arbiter-hits arbiter_hits.tsv --reciprocal reciprocal.tsv \
--context context.tsv --trees trees.tsv --sampling-depth sampling_depth.tsv \
--databases databases.json --hypotheses hypotheses.tsv --reflections reflections.tsv \
--query-domain ncldv --out "$RUN_DIR/interdomain-hgt"
The driver checks database presence and domain coverage (--verify-checksums recomputes full SHA-256 checksums on demand), applies the gates below, normalizes confirmed candidates by lineage sampling depth, and writes run_manifest.json under schemas/hgt-evidence.schema.json:
| Gate | Pass rule in the driver |
|---|---|
| Homology | query and subject coverage >= 0.5 and e-value <= 1e-5 |
| Reciprocal best hit | forward_rank and reverse_rank both 1 |
| Direction (hits + tree) | Query best-matching recipient domain supports recipient_to_query; recipient best-matching --query-domain supports query_to_recipient. When both hold (typical reciprocal pair), the hits are tied and the ML gene tree decides. Below --min-identity, direction stays ambiguous. |
| Context | recipient_domain_fraction >= 0.6; eukaryotic recipients require method = diamond_blastx |
| Phylogeny (typed support) | trees.tsv carries support (0-1), support_type (ufboot, bootstrap, or sh_like), and shalrt (0-1 or na). Strong ML support requires ufboot >= 0.95 (with shalrt >= 0.80 if given) or bootstrap >= 0.70; sh_like (VeryFastTree) is exploratory only and cannot confirm a transfer. A strongly supported tree that disagrees with the hit direction rejects the call. |
Lineages (recipient_lineage, expected_clade, nesting_clade) use ;-separated root-down ranks compared rank by rank (accepting both clade-inside-lineage and ancestor-of-lineage matches, while leaving a broad ancestor shared by both sides uninformative). Domain labels use eukaryota, bacteria, archaea, ncldv, phage, organelle. Hypotheses require at least five unique IDs with at least one technical or null row; reflections cover database, forward, reciprocal, context, phylogeny, final in order.
Resolve $BIO_DB_ROOT (check_databases.py --export); never hardcode absolute paths. Verify BOTH exist before searching:
.dmnd or MMseqs2) spanning all six domains (eukaryota, bacteria, archaea, ncldv, phage, organelle) with a genome_id -> lineage table (docs/database-availability.md). Prefer a clustered build (clusterednr / MMseqs2-reduced). Never polarize HGT with a single-domain arbiter.diamond blastx --range-culling --top 10 -F 15 of the locus +/- flank window against the arbiter; cross-check viral regions with geNomad or ViroSync (for integrated eukaryotic EVEs).--sensitive for focal sets. On CUDA GPUs, mmseqs easy-taxonomy --gpu is an alternative.sh_like) to clean alignments and prune contaminants quickly, then confirm candidates with IQ-TREE 3 (ufboot + shalrt) before marking HGT as confirmed.$BIO_DB_ROOT..faa), query contigs (.fna), and tools (diamond, mafft/famsa, clipkit/trimal, VeryFastTree, iqtree3, genomad, taxonkit, seqkit; docs/README.md).Driver outputs under $RUN_DIR/interdomain-hgt/: hgt_candidates.tsv, query_protein_origin.tsv, lineage_sampling_normalization.tsv, phylogeny_evidence.tsv, hypothesis_register.tsv, gate_reflections.tsv, and run_manifest.json.
forward_hits.tsv, lineage_function_matrix.tsv, phylogeny/<gene>/, hgt_report.md, and logs/.ufboot/bootstrap required for confirmed).--min-identity cutoff (or reason it is off) and ambiguous count are logged.VeryFastTree (sh_like) alone without ML tree nesting.agents/openai.yaml (opens in a new tab)docs/README.md (opens in a new tab)docs/database-availability.md (opens in a new tab)fixtures/arbiter.dmnd (opens in a new tab)fixtures/arbiter_hits.tsv (opens in a new tab)fixtures/comparison.fna (opens in a new tab)fixtures/context.tsv (opens in a new tab)fixtures/databases.json (opens in a new tab)fixtures/forward_hits.tsv (opens in a new tab)fixtures/hypotheses.tsv (opens in a new tab)fixtures/labels.tsv (opens in a new tab)fixtures/reciprocal.tsv (opens in a new tab)fixtures/reflections.tsv (opens in a new tab)fixtures/sampling_depth.tsv (opens in a new tab)fixtures/trees.tsv (opens in a new tab)references/workflow.md (opens in a new tab)schemas/hgt-evidence.schema.json (opens in a new tab)scripts/run_hgt_evidence.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/beautiful-data-vizShared design rules for every plot, figure, chart, dashboard or Dash app (matplotlib, seaborn, ggplot2, Plotly, HTML/SVG). Greyscale first, curated non-stock palettes, IBM Plex Sans, no in-plot titles, crisp text, tight layout. Use when making, restyling or reviewing any chart, figure or dashboard./bio-annotationAnnotate proteins with functions, domains, and homology-based taxonomy. Use when assigning functional or taxonomic labels to proteins from genomes, contigs, or MAGs./bioinformatics-projectStructure reproducible bioinformatics projects with a canonical layout, restartable drivers, pinned environments, provenance, and lab notebook. Use when starting or reorganizing a genomics project or making a sequencing analysis rerunnable./bio-logicAssess a scientific claim, study design, or interpretation of project results against its evidence, and keep a hypothesis register. Use when testing causal reasoning, finding bias, weighing alternative explanations, or revising hypotheses./bio-viromicsDetect, QC, and classify viral contigs and endogenized viral elements (EVEs) with geNomad, CheckV, GVClass, vConTACT3, Phold, and ViroSync. Use when finding viruses in assemblies, detecting EVEs in eukaryotic genomes, grading viral genomes, or assigning giant-virus or phage taxonomy./crossref-lookupQuery Crossref to validate DOIs, match titles to DOIs, fetch citation metadata and audit bibliographies; also report OpenAlex citation counts. Use when resolving references, cleaning citation records, or comparing papers by citations.npx claudepluginhub fmschulz/omics-skills --plugin omics-skillsOther plugins' skills for the same job