Skip to content

Metamorph vingette, CI extentsion, bug fixing - #44

Open
rroutsong wants to merge 10 commits into
mainfrom
metamorph_vingette
Open

rroutsong wants to merge 10 commits into
mainfrom
metamorph_vingette

Conversation

@rroutsong

@rroutsong rroutsong commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator
  • extended continuous integration to support all valid combinations of new cli kwargs
  • allow for injectable contigs into dehost method
  • fix temp directory related bugs across the assembly based workflow
  • vingette applying analysis to a set of zymo standards
  • qc summary surfacing top level qc metrics
  • extended sample sheet validation checks within the pipeline
  • fix resource allocation mislabeling
  • add extendable-configurable cruft management

end to end tested output: /data/OpenOmics/dev/metamorph/remove_cruft_at_end/enzymatic_community_data/output_full_depth

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Duplicate-file validation, host-genome symlinks, cleanup tracking/recovery, and documentation accuracy have unresolved issues.

Review effort: Balanced
Findings: 1 High severity · 3 Medium severity · 3 Low severity

Open (7)
What changed in this PR

Adds a ZymoBIOMICS vignette alongside host-genome screening, QC summaries, terminal cleanup, validation, and workflow reliability improvements.

Changes:

  • Adds optional DNA host screening and QC/provenance summaries.
  • Improves temporary-directory isolation, dRep execution, and cleanup.
  • Expands documentation, analysis artifacts, validation tests, and CI coverage.
File Description
workflow/​Snakefile Adds QC and cleanup targets.
workflow/​scripts/​sample_qc_summary.py Generates per-sample QC summaries.
workflow/​scripts/​cleanup_cruft.py Implements manifest-driven cleanup.
workflow/​rules/​RNA.smk Isolates temporary paths and removes intermediates.
workflow/​rules/​DNA.smk Adds host screening, QC, and scratch improvements.
workflow/​rules/​cleanup.smk Adds terminal cleanup rule.
test/​test_valid_input.py Tests sample-sheet validation.
test/​__init__.py Initializes the test package.
src/​utils.py Strengthens input and host-genome validation.
src/​run.sh Detects Slurm scratch support.
src/​run.py Adds host and scratch container binds.
run_tests.sh Adds unit-test runner.
mkdocs.yml Adds manual and walkthrough navigation.
metamorph Exposes --host-genome.
docs/​walkthrough.md Adds an end-to-end workflow walkthrough.
docs/​usage/​run.md Documents host screening, QC, and cleanup.
docs/​manual/​zymo-vignette.md Adds the ZymoBIOMICS analysis vignette.
docs/​manual/​zymo_vignette_scripts/​zymo_single_rep_bc.json Stores replicate dissimilarities.
docs/​manual/​zymo_vignette_scripts/​zymo_refmap_results.json Stores reference-mapping results.
docs/​manual/​zymo_vignette_scripts/​zymo_refmap_analysis.py Analyzes reference mapping.
docs/​manual/​zymo_vignette_scripts/​zymo_fulldepth_results.json Stores full-depth results.
docs/​manual/​zymo_vignette_scripts/​zymo_fulldepth_analysis2.py Computes coverage-normalized estimates.
docs/​manual/​zymo_vignette_scripts/​zymo_fulldepth_analysis.py Analyzes full-depth classifications.
docs/​manual/​zymo_vignette_scripts/​zymo_convergence.py Computes convergence metrics.
docs/​manual/​zymo_vignette_scripts/​zymo_convergence_results.json Stores convergence results.
docs/​manual/​zymo_vignette_scripts/​zymo_asm_coverage_results.json Stores assembly coverage results.
docs/​manual/​zymo_vignette_scripts/​vendor_bars_pixel_extracted.json Stores extracted vendor benchmarks.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012165.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012164.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012163.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012162.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012161.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012160.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​refmap_refstats/​ERR16012159.refstats Adds replicate mapping statistics.
docs/​manual/​zymo_vignette_scripts/​dehost_read_counts.json Stores dehosting counts.
docs/​manual/​zymo_vignette_scripts/​build_refmap_chart.py Builds reference-mapping chart.
docs/​manual/​zymo_vignette_scripts/​build_mash_heatmap.py Builds Mash heatmap.
docs/​manual/​zymo_vignette_scripts/​build_dehost_chart.py Builds dehosting chart.
docs/​manual/​zymo_vignette_scripts/​build_convergence_chart.py Builds convergence chart.
docs/​manual/​zymo_vignette_scripts/​build_composition_chart.py Builds composition chart.
docs/​manual/​introduction.md Adds conceptual pipeline introduction.
config/​cluster.json Adds resources for new rules.
config/​cleanup.json Defines default cleanup actions.
.tests/​dummy_host_genome.fasta Supports host-genome dry runs.
.github/​workflows/​main.yaml Expands CI dry-run matrix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/utils.py Outdated
Comment thread src/utils.py Outdated
Comment on lines +18 to +35
input:
all_targets
output:
touch(cruft_sentinel)
params:
rname = "cleanup_cruft",
# workpath (not the metagenome_results/ subdir) so manifest patterns
# can reach anything under --output, e.g. dna/, rna/, logfiles/.
project_dir = workpath,
manifest_path = join(workpath, "config", "cleanup.json"),
threads: int(cluster["cleanup_cruft"].get("threads", default_threads)),
singularity: metawrap_container,
shell:
"""
python3 workflow/scripts/cleanup_cruft.py \\
--manifest {params.manifest_path} \\
--project-dir {params.project_dir}
"""
Comment on lines +83 to +86
log(f"compress_indexed: bgzip -l 9 {path}")
if not dry_run:
subprocess.run(["bgzip", "-f", "-l", "9", path], check=True)

Comment thread docs/usage/run.md Outdated
Comment thread docs/walkthrough.md
Comment on lines +83 to +91
```text
job count
----------------------------- -------
all 1
bowtie2_dehost 2
dna_centrifuger 2
metawrap_read_qc_skipBmtagger 2
total 7
```
Comment thread docs/walkthrough.md Outdated
@rroutsong rroutsong self-assigned this Oct 6, 2026
rroutsong and others added 6 commits October 6, 2026 10:05
…ing container bind mounts'

resolve links

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…Centrifuge to Centrifuger'

typo

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…irectory'

docs update

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…by real path'

symlink resolve

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@rroutsong rroutsong changed the title Metamorph vingette Metamorph vingette, CI extentsion, bug fixing Oct 6, 2026
@rroutsong
rroutsong requested a review from skchronicles October 6, 2026 16:01

This branch has not been deployed

No deployments
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.

2 participants