Skip to content

Resistome / AMR (W4) transform suite + pipeline DAG render#11

Open
phy0x1a79ed wants to merge 2 commits into
hallamlab:spanish-lakes-metagenomicsfrom
phy0x1a79ed:feat/spanish-lakes-metagenomics
Open

Resistome / AMR (W4) transform suite + pipeline DAG render#11
phy0x1a79ed wants to merge 2 commits into
hallamlab:spanish-lakes-metagenomicsfrom
phy0x1a79ed:feat/spanish-lakes-metagenomics

Conversation

@phy0x1a79ed

Copy link
Copy Markdown
Contributor

Resistome / AMR (W4) transform suite + pipeline DAG render

Adds the full resistome tool suite for the Spanish Lakes W4 (AMR/resistome) workflow, encoded as metasmith transforms, plus a re-runnable DAG renderer. Rebased onto the current spanish-lakes-metagenomics tip; _metadata/ regenerated via metasmith build so the union of these types and the upstream PathoLogic types is consistent and reproducible (verified: a clean rebuild produces no diff).

Terminal tools (per Antonio's Resistome_Tony spec)

  • ARG detection — RGI/CARD (rgi, rgi_mag on COMEBin MAGs), AMRFinderPlus, MEGARes / BacMet / VFDB via DIAMOND (ORF-chunk fan-out → merge_*).
  • Virulence / pathogenicity — PathoFact 2.0 (contigs), VFDB.
  • Mobilome — geNomad, IntegronFinder, MobileElementFinder, VirSorter2.
  • Source tracking — FEAST (MetaPhlAn sink), crAssphage (BBMap → NC_024711).
  • Strain / microdiversity — inStrain, StrainPhlAn.

All ARG/VF/MGE tools preserve the original k141_XXXXXX contig IDs for Antonio's downstream merge.

Logistics (reference-DB downloaders)

downloadCardDB, downloadAmrfinderDB, downloadMegaresDB, downloadBacmetDB, downloadVfdbDB, downloadVirsorter2DB, downloadCrassphageRef, plus stub downloaders for the data/build-blocked inputs (downloadPathofactDB, downloadFeastSources) so the graph closes.

Container resources

Adds .oci pointers: rgi, amrfinderplus, integronfinder, instrain, mobileelementfinder, pathofact, feast.

DAG render

main/render_resistome_dag.py renders the end-to-end resistome DAG (seeds the coupling-heavy intermediates so the multi-branch solve converges).

Known stubs / deferred (not runnable as-is)

  • annotation::pathofact_db (Zenodo 14192463) + containers::pathofact.oci — build deferred.
  • annotation::feast_sources (curated source matrix) + containers::feast.oci — data + build deferred.
  • containers::mobileelementfinder.oci — no biocontainer yet.
  • downloadMegaresDBdiamond makedb (protein) on the MEGARes nucleotide FASTA; needs a translate step.

🤖 Generated with Claude Code

phy0x1a79ed and others added 2 commits June 27, 2026 00:01
Encode Antonio's Resistome_Tony tool table as metasmith transforms over the
already-published assemblies (contigs + Prodigal proteins + COMEBin MAGs),
preserving the original k141_XXXXXX contig IDs end-to-end (never re-calling
ORFs) so his master integration table merges cleanly.

Added (24 transforms):
- DIAMOND ARG/VF (clone of diamond_tcdb chunk+merge): megares, bacmet, vfdb
- single biocontainer: rgi (+rgi_mag on COMEBin MAGs), amrfinderplus,
  integronfinder, instrain (BAM-limited to 12 gapfill samples), strainphlan
  (reuses metaphlan.oci), crassphage (reuses bbtools.oci)
- BUILD-blocked (container recipes scaffolded in container_builds): pathofact,
  feast, mobileelementfinder
- 8 DB downloaders incl. the missing downloadVirsorter2DB

Reused as-is: genomad, virsorter2. Deduped: CoverM -> existing per-contig
coverage + comebin contig_to_bin. New annotation/container data types + .oci
refs. Verified: dev.sh -b builds clean; GenerateWorkflow task.ok=True for
megares (orfs->chunk->merge) and rgi targets.

Also fix dev.sh -b for the current `metasmith build` CLI (positional STEP +
repeatable -t/-u/-r; the old multi-value glob leaked resources/lib into STEP).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add downloadPathofactDB.py local stub (product annotation::pathofact_db,
the one resistome input with no producer; points at Zenodo 14192463) so the
planner can close the whole resistome graph.

Add main/render_resistome_dag.py, which renders the pipeline as two
complementary DAGs (results/, gitignored): the resistome annotation layer
(13 terminal tools + DIAMOND chunk/merge fan-out + DB downloaders) and an
upstream preprocessing companion (prodigal/comebin/metaphlan). Split because
a single joint MCTS solve over all 13 diverse full-length branches does not
converge; seeding the 4 coupling-heavy intermediates makes it tractable
(~20s, deterministic at seed=1).

Both pathofact_db and feast_sources resolve via local stubs for now — not
runnable; real container builds + Antonio's reference data still pending.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant