Skip to content

Wire dnaseq mergeExperiments: config, cache, variation load, webservices publish#93

Open
jbrestel wants to merge 14 commits into
masterfrom
dnaseq-merge-experiments
Open

Wire dnaseq mergeExperiments: config, cache, variation load, webservices publish#93
jbrestel wants to merge 14 commits into
masterfrom
dnaseq-merge-experiments

Conversation

@jbrestel

Copy link
Copy Markdown
Member

Summary

Wires the mergeExperiments nextflow entry into the dnaseq ReFlow workflow and loads/publishes its output.

  • Config reconcile + ploidy (MakeDnaSeqMergeExperimentsNextflowConfig.pm): drops 6 params the current dnaseq-nextflow mergeExperiments entry no longer consumes (cacheFileDir, varscanDirectory, varscanFilePath, webServicesDir, extDbRlsSpec, organism_abbrev), makes cacheFile an absolute path, and adds the now-required ploidy — derived by reading the per-experiment nextflow configs and validating they agree (dies on mismatch). Ploidy-from-configs is a documented workaround; it belongs on apidb.organism long-term.
  • transcript_product.dat cache persisted across runs: dnaseq.xml touches an empty cache file before the merge (survives re-runs; lives outside the ephemeral _mergeExperiments dir), passes it as --cache_file, and copies the fresh output back afterward.
  • Variation load: new thin InsertVariationFeatures WorkflowStep wrapping ApiCommonData::Load::Plugin::InsertVariationFeatures, plus a CreateExtDbAndDbRls step creating <org>_dnaSeqVariations|do_not_care.
  • Webservices publish: new CopyDnaSeqMergeResultsToWebServices step publishes merged.ann.vcf.gz(+.tbi) → <org>/dnaseq/vcf/ and hsss_readFreqN<org>/dnaseq/readFreqN (prefix stripped), into the same dnaseq/ base bigwigs use.
  • Subgraph (dnaSeqMergeExperiments.xml) updated to match; touches the undoneStrains input the run requires.

Design/plan docs under docs/superpowers/.

Test Plan

Static verification (done): perl -c on all step classes; ploidy helper harness (consistent → value, mismatch → abort, empty/missing → die); xmllint on both XMLs; merge-output test-data artifacts present for every consumer; cross-file integration review.

Integration (requires cluster + DB, not yet run):

  • Run dnaseq for an organism with ≥2 experiments; confirm merge output, cache populated afterward, InsertVariationFeatures loads <org>_dnaSeqVariations, and <org>/dnaseq/{vcf,readFreqN} populated.
  • Second run reuses the non-empty cache.
  • Report the mergeCoverageBeds _coverage.bed.gz vs .coverage.bed.gz naming observation to the dnaseq-nextflow repo.

🤖 Generated with Claude Code

jbrestel and others added 14 commits July 10, 2026 14:11
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…y from experiment configs

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ead experimentConfigGlob and absolute cacheFile

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ng plugin

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…dirs to dnaseq webservices

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…atch copy

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t-db and variation load, webservices publish

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g line)

Not needed in this workflow; the nextflow-side processSeqVars will no longer
require the undone_strains_file input.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merge processes are singletons over collect()'d inputs, so maxForks only
gates the few independent early branches. Serialize to keep peak memory
flat (snpEff JVM, Julia processSeqVars).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…sions

Drop the experiment-name prefix from staged filenames so mergeCoverageBeds
column names match the bare VCF sample names that processSequenceVariations.jl
looks up (the prefix only ever reached data via coverage, silently breaking
coverage lookups). Sample names must be unique across experiments; enumerate
all streams first and error with the offending sample/experiments before
creating any symlinks, instead of letting ln -sf silently clobber a collision.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The merge config's reference_strain was blank: it queried ref_strain_abbrev,
which is not set for reference-strain organisms (the only ones dnaseq runs
for). Use the organism's own strain_abbrev via the shared OrganismInfo object
instead, replacing the bespoke DbiDatabase connection. Plumb gusConfigFile
through the merge subgraph so getOrganismInfo can be used.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The generated config globbed coverage/*.coverage.bed.gz (literal dot), but
gathered files are named <sample>_coverage.bed.gz (underscore), so the glob
matched nothing and the merge ran with no coverage data. Correct the
separator to _coverage.bed.gz.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace RunNextflowWithEntry with RunNextflowLocal in
dnaSeqMergeExperiments.xml (analysisDir->workingDir, config path
relative to workflowDataDir, drop gitBranch). Remove the now-unused
RunNextflowWithEntry.pm.

Co-Authored-By: Claude Opus 4.8 <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