Skip to content

PRODUCT_HEATMAP hangs indefinitely in v2.0.0-beta26 — product.html never generated #32

@bharat1912

Description

@bharat1912

Pipeline version: v2.0.0-beta26 (commit f03804bca4)
dram-viz version: 0.2.5 (container community.wave.seqera.io/library/python_dram-viz:461ef0d1ed919a7e)
Nextflow version: 25.10.4
OS: Ubuntu 24, Dell Precision Tower 7810
Container engine: Apptainer 1.4.5

Description
When running DRAM2 with -profile apptainer,full_mode, the PRODUCT_HEATMAP process starts but never completes. It runs indefinitely — I waited over 2 hours with a single genome (3,892 annotation lines) before killing the process. No error message is produced. The output directory contains ANNOTATE/ and SUMMARIZE/ but no VISUALIZE/ directory and no product.html.

Steps to reproduce
bashnextflow run WrightonLabCSU/DRAM
-revision dev
-profile apptainer,full_mode
--anno_dbs kofam,dbcan,camper,fegenie,methyl,cant_hyd,sulfur,merops,metals,vog,viral
--input_fasta /path/to/input_genomes
--outdir /path/to/outdir
[... database flags ...]
All annotation and summarize steps complete successfully and are cached. Only PRODUCT_HEATMAP hangs.

Diagnosis
Inspecting the work directory .command.sh showed:
bashdram_viz
--annotations raw-annotations.tsv
--fasta_column input_fasta


Note: --output_dir was missing from the command (separate issue in product_heatmap.nf — the $args variable was not including it). After adding --output_dir ./ to the script, the process still hung.
Running dram_viz manually inside the container confirmed the hang:
bashapptainer exec docker://community.wave.seqera.io/library/python_dram-viz:461ef0d1ed919a7e
dram_viz --annotations raw-annotations.tsv --fasta_column input_fasta --output_dir ./

Hangs indefinitely — must kill with Ctrl+C

Inspecting make_product.py inside the container revealed the root cause:
pythonif dashboard:
pn.serve(lambda: Dashboard(**kw), port=port)
else:
Dashboard(**kw) # ← object created but never saved to HTML
When --dashboard is not specified (the standard pipeline mode), the code creates the Dashboard Panel object but never calls any save or export method on it. The process therefore runs indefinitely waiting for something that never happens. There is no error, no timeout, and no output.

Impact on biology users
This bug completely blocks the primary visual output of DRAM2 (product.html) for all users running the standard pipeline. From a biologist's perspective — particularly those without IT or coding background — the process appears to be running normally (no error message, CPU activity visible) and there is no way to distinguish this from a slow computation versus a broken code path. Users are likely to wait hours before concluding something is wrong, with no path to diagnosis or fix.
DRAM1 (conda/mamba installation) produced product.html reliably. Biology users familiar with DRAM1 will expect the same from DRAM2 and will have no way to understand why it fails silently.

Workaround (confirmed working)
Revert product_heatmap.nf to use the dram-viz 0.1.8 container with the old --groupby-column argument:
groovyprocess PRODUCT_HEATMAP {
label 'process_small'
errorStrategy 'finish'

conda "${moduleDir}/environment.yml"
container "community.wave.seqera.io/library/python_dram-viz:16eae7534cb2ead2"

input:
path( ch_final_annots, stageAs: "raw-annotations.tsv")
val(fasta_column)
path(rules_tsv)
val(rules_system)

output:
path( "product.html" ), emit: product_html

script:
"""
dram_viz --annotations ${ch_final_annots} --groupby-column ${fasta_column}
"""

}
With this patch, product.html is generated correctly and the pipeline completes successfully.

Suggested fix
In dram_viz/make_product.py, the non-dashboard code path needs to save the Panel object to HTML before exiting. Something like:
pythonif dashboard:
pn.serve(lambda: Dashboard(**kw), port=port)
else:
dashboard_obj = Dashboard(**kw)
output_dir.mkdir(parents=True, exist_ok=True)
dashboard_obj.save(str(output_dir / "product.html"), embed=True)
The exact method will depend on how the Dashboard class is structured, but the key point is that the non-dashboard path must write product.html and exit cleanly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions