mag icon indicating copy to clipboard operation
mag copied to clipboard

Issue with MAG_DEPTHS_PLOT

Open x-rv opened this issue 2 years ago • 3 comments

I'm running mag in my institution's cluster and in the MAG_DEPTHS_PLOT step I run into the error _tkinter.TclError: couldn't connect to display "localhost:11.0".

For what I've read, I guess that's some issue related to X11. When I connect to the cluster via ssh I allow X11 since I have this written in my .ssh/config:

Host *
  ForwardAgent yes
  ForwardX11 yes

Do I need to start a X11 session before running the pipeline? But I can't since I'm not root of the cluster. What seems easiest for me is to skip this process in the pipeline, but I don't see any flag to do it and it's a required process for the pipeline to continue. Any ideas of what can I do or whether this skip flag could be added to the pipeline?

Here's the full error message:

Error executing process > 'NFCORE_MAG:MAG:BINNING:MAG_DEPTHS_PLOT (SPAdes-MaxBin2-test_minigut)'

Caused by:
  Process `NFCORE_MAG:MAG:BINNING:MAG_DEPTHS_PLOT (SPAdes-MaxBin2-test_minigut)` terminated with an error exit status (1)

Command executed:

  plot_mag_depths.py --bin_depths SPAdes-MaxBin2-test_minigut-binDepths.tsv                     --groups sample_groups.tsv                     
--out "SPAdes-MaxBin2-test_minigut-binDepths.heatmap.png"
  
  cat <<-END_VERSIONS > versions.yml
  "NFCORE_MAG:MAG:BINNING: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:
  Traceback (most recent call last):
    File "/home/xrey/.nextflow/assets/nf-core/mag/bin/plot_mag_depths.py", line 71, in <module>
      sys.exit(main())
    File "/home/xrey/.nextflow/assets/nf-core/mag/bin/plot_mag_depths.py", line 54, in main
      plt.figure()
    File "/home/xrey/miniconda3/envs/nf_mag/lib/python3.6/site-packages/matplotlib/pyplot.py", line 693, in figure
      **kwargs)
    File "/home/xrey/miniconda3/envs/nf_mag/lib/python3.6/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
      return cls.new_figure_manager_given_figure(num, fig)
    File "/home/xrey/miniconda3/envs/nf_mag/lib/python3.6/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure
      window = tk.Tk(className="matplotlib")
    File "/home/xrey/miniconda3/envs/nf_mag/lib/python3.6/tkinter/__init__.py", line 2023, in __init__
      self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
  _tkinter.TclError: couldn't connect to display "localhost:11.0"

Work dir:
  /mnt/lustre/scratch/xrey/genomes/nextflow-mag/work/e7/09028286e27279854f9425097af44e

Tip: when you have fixed the problem you can continue the execution adding the option `-resume` to the run command line

x-rv avatar Mar 30 '23 11:03 x-rv