UC4_HYPHY_issue

UC4 / HyPhy molecular-selection landscape (Dengue CDS) — interview input

Pulled-down GitHub issue used as the effective result of the INTERVIEW → GALAXY interview (the live interview mechanics are harness-owned and precede pipeline phase 1). Source: https://github.com/jmchilton/galaxy-brain/issues/27 Paired aspirational target: none yet — workflow not yet extracted from a Galaxy history.


Purpose

Develop a Galaxy Notebooks paper/demo vignette for a molecular-evolution / natural-selection analysis. We are writing a paper about “Galaxy Notebooks” — history-attached Galaxy-flavored markdown documents that embed REAL on-graph Galaxy tool outputs (tables, heatmaps, plots, images) into narrative, and from which a reusable workflow can be extracted by walking the history provenance graph backward. The discipline that matters: every figure/table the notebook displays should be a genuine on-graph tool output (so it’s auditable AND seeds workflow extraction), analyses should run as collection map-overs where possible, and off-graph/pasted artifacts should be avoided. This issue belongs to galaxy-brain because the deliverable is a paper/demo notebook, NOT a proposal to add or change an IWC workflow.

Objective

Show the conceptual jump from “run one selection test on one gene alignment” to “map a whole panel of HyPhy selection methods across a collection of codon alignments, then collapse the per-gene JSONs into a single cross-gene summary table you can read as a selection landscape.”

Why this is a useful demo deviation

The IWC HyPhy workflows are batch pipelines that emit collections of per-gene JSON blobs — machine-readable but not human-narratable. A notebook is exactly the right surface to turn those JSONs into an interpreted selection landscape: a combined summary table across genes, a per-site significance view, and (for Compare) an explicit “did selection relax or intensify in recent lineages” verdict. It also showcases two notebook-friendly Galaxy patterns at once: collection map-over (one HyPhy tool fanned across a codon-alignment collection) and provenance-driven workflow extraction (the combined-summary tool sits at the bottom of the graph, so walking backward reconstructs the full preprocessing + per-method pipeline). DRHIP, the combined-summary tool, gives us genuine on-graph tables to embed instead of hand-parsing JSON off-graph.

Existing analysis anchors

IWC repo: https://github.com/galaxyproject/iwc — workflows under workflows/comparative_genomics/hyphy/.

Public data candidates

All anchor test data ships in-repo under workflows/comparative_genomics/hyphy/test-data/ — no Zenodo/NCBI fetch is required to reproduce the MVP. What’s actually present:

Recommendation: Anchor the paper story on Compare (historical 1980–2004 vs. 2023 RELAX/CFEL shift) because that’s the novel, narratable question and the foreground list is curated for exactly this contrast — but ship Core as the simpler MVP first, since Core has no foreground dependency and its combined summary table is the cleanest “selection landscape” artifact. Present Compare as the headline figure, Core as the foundation. Caveat the small reference panel (two genes) and small foreground (three sequences) honestly in the narrative.

Notebook workflow plan

  1. Import the reference CDS (denv1_ref_cds.fasta) as a single dataset and the 39 unaligned isolates as a list collection (one element per isolate). For Compare, also import foreground_seqs_list.txt.
  2. Run codon-aware Preprocessing end-to-end (remove terminal stop codons → collapse → faSplit → cawlign against the reference → CLN → IQ-TREE), yielding a codon-alignment collection and a gene-tree collection, both keyed by gene. Display the alignment collection as an on-graph artifact. (MVP shortcut: import the precomputed codon_alignments/ + iqtree_trees/ collections directly to skip alignment runtime.)
  3. Core, as a collection map-over: run MEME, FEL, BUSTED, and PRIME (genetic code Universal) each mapped over the codon-alignment collection → four per-gene JSON collections on-graph.
  4. Run DRHIP (drhip/0.1.4+galaxy0) over the JSON collections to produce combined_summary (per-gene gene-wide selection verdicts) and combined_sites (per-site significant codons across genes). Embed both tables directly.
  5. Compare branch (stretch): hyphy_annotate to label the 2023 foreground + reference branches on the gene trees (→ labeled_tree collection), then RELAX and Contrast-FEL mapped over the (labeled-tree, alignment) pairs → relax_output + cfel_output JSON collections.
  6. Run DRHIP comparison mode → combined_comparison_summary (RELAX K intensification/relaxation per gene) and combined_comparison_site (CFEL site-level foreground-vs-background dN/dS contrasts). Embed as the headline tables.
  7. Narrative interpretation cells beside each table: which genes/sites are under episodic diversifying (MEME) vs. pervasive (FEL) vs. gene-wide (BUSTED) selection; and whether RELAX reports relaxation (K<1) or intensification (K>1) in the 2023 lineage, with CFEL sites flagged.

Expected paper/demo artifacts

Scope and risks

Tasks