Skip to content

Remove MAG_DEPTHS_PLOTS #869

Description

@jfy133

UPDATE

Based on the poll on Slack, and a discussion without a clear outcome I think we should remove the heatmap plotting of the MAG_DEPTHS output, as it keeps causing issues when you have poor assemblies

Description of the bug

Identified in full megatest, where the binDepths table is all 0 (because all bin depths for the long-reads are < 0 (see: https://nfcore.slack.com/archives/CE9MS66BS/p1759093138234159):

Error executing process > 'NFCORE_MAG:MAG:DEPTHS:MAG_DEPTHS_PLOT (METAMDBG-MaxBin2-CAPES_S11)'

Caused by:
  Essential container in task exited


Command executed:

  plot_mag_depths.py --bin_depths METAMDBG-MaxBin2-CAPES_S11-binDepths.tsv                     --groups sample_groups.tsv                     --out "METAMDBG-MaxBin2-CAPES_S11-binDepths.heatmap.png"
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_MAG:MAG:DEPTHS:MAG_DEPTHS_PLOT":
      python: $(python --version 2>&1 | sed 's/Python //g')
      pandas: $(python -c "import pkg_resources; print(pkg_resources.get_distribution('pandas').version)")
      seaborn: $(python -c "import pkg_resources; print(pkg_resources.get_distribution('seaborn').version)")
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  9:20PM INF instance metadata ami-id=ami-08c9a28b806bde705 instance-id=i-0ffc293b20fc185a6 instance-type=c6id.32xlarge
  Traceback (most recent call last):
    File "/usr/local/bin/plot_mag_depths.py", line 83, in <module>
      sys.exit(main())
    File "/usr/local/bin/plot_mag_depths.py", line 70, in main
      sns.clustermap(
    File "/usr/local/lib/python3.9/site-packages/seaborn/_decorators.py", line 46, in inner_f
      return f(**kwargs)
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 1402, in clustermap
      return plotter.plot(metric=metric, method=method,
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 1220, in plot
      self.plot_dendrograms(row_cluster, col_cluster, metric, method,
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 1065, in plot_dendrograms
      self.dendrogram_row = dendrogram(
    File "/usr/local/lib/python3.9/site-packages/seaborn/_decorators.py", line 46, in inner_f
      return f(**kwargs)
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 784, in dendrogram
      plotter = _DendrogramPlotter(data, linkage=linkage, axis=axis,
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 594, in __init__
      self.linkage = self.calculated_linkage
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 661, in calculated_linkage
      return self._calculate_linkage_scipy()
    File "/usr/local/lib/python3.9/site-packages/seaborn/matrix.py", line 629, in _calculate_linkage_scipy
      linkage = hierarchy.linkage(self.array, method=self.method,
    File "/usr/local/lib/python3.9/site-packages/scipy/cluster/hierarchy.py", line 1065, in linkage
      raise ValueError("The condensed distance matrix must contain only "
  ValueError: The condensed distance matrix must contain only finite values.
  Fusion Info:
      fusion_version: 2.4.14-93ca7f1
      clone_namespace: false
      kernel_version: 6.1
      disk_cache_size: 7076Gb
      max_open_files: 1048576

Work dir:
  s3://nf-core-awsmegatests/work/mag/dev/f0/75ef4fd5c230ac124006399b80acb7

Container:
  wave.seqera.io/wt/6c6649eadd4c/biocontainers/mulled-v2-d14219255233ee6cacc427e28a7caf8ee42e8c91:0a22c7568e4a509925048454dad9ab37fa8fe776-0

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

Command used and terminal output

Relevant files

No response

System information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions