bxlab / metaWRAP

MetaWRAP - a flexible pipeline for genome-resolved metagenomic data analysis
MIT License
390 stars 191 forks source link

Error at the end of Bin_refinement module #18

Open laam21 opened 6 years ago

laam21 commented 6 years ago

I am getting an error at the end of the Bin_refinement pipeline. When I run...

metawrap bin_refinement -o BIN_REFINEMENT -t 56 -A INITIAL_BINNING/metabat2_bins/ -B INITIAL_BINNING/maxbin2_bins/ -C INITIAL_BINNING/concoct_bins/ -c 50 -x 10 

I get ...


------------------------------------------------------------------------------------------------------------------------
-----           There are 14 'good' bins found in binsO.checkm! (>50% completion and <10% contamination)           -----
------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------
-----                                 Removing bins that are inadequate quality...                                 -----
------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------
-----             Re-evaluating bin quality after contig de-replication is complete! There are still 14            -----
-----                                              high quality bins.                                              -----
------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------
-----                making completion and contamination ranking plots for all refinement iterations               -----
------------------------------------------------------------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/a1654837/.conda/envs/metawrap-env/bin/metawrap-scripts/plot_binning_results.py", line 6, in <module>
    import matplotlib.pyplot as plt
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 114, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
    from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
    from .backend_qt5 import QtCore
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 31, in <module>
    from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/qt_compat.py", line 124, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: libXrender.so.1: cannot open shared object file: No such file or directory
mv: cannot stat `binning_results.eps': No such file or directory
mv: cannot stat `binning_results.png': No such file or directory

------------------------------------------------------------------------------------------------------------------------
-----                Finalizing bin set naming, and moving over intermediate files into 'work_files'               -----
------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------
-----                      making completion and contamination ranking plots of final outputs                      -----
------------------------------------------------------------------------------------------------------------------------

Traceback (most recent call last):
  File "/home/a1654837/.conda/envs/metawrap-env/bin/metawrap-scripts/plot_binning_results.py", line 6, in <module>
    import matplotlib.pyplot as plt
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/pyplot.py", line 114, in <module>
    _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 32, in pylab_setup
    globals(),locals(),[backend_name],0)
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 18, in <module>
    from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 15, in <module>
    from .backend_qt5 import QtCore
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 31, in <module>
    from .qt_compat import QtCore, QtGui, QtWidgets, _getSaveFileName, __version__
  File "/home/a1654837/.conda/envs/metawrap-env/lib/python2.7/site-packages/matplotlib/backends/qt_compat.py", line 124, in <module>
    from PyQt4 import QtCore, QtGui
ImportError: libXrender.so.1: cannot open shared object file: No such file or directory
mv: cannot stat `binning_results.eps': No such file or directory
mv: cannot stat `binning_results.png': No such file or directory

########################################################################################################################
#####                                BIN_REFINEMENT PIPELINE FINISHED SUCCESSFULLY!                                #####
######################################################################################################################## ```
ursky commented 6 years ago

Thanks again for the feedback! I did not realize that this was a dependency. Can you try to installing xorg-libxrender on your end and see if that fixes it? Run conda install xorg-libxrender, and then re-run just the plotting function, or just run /home/a1654837/.conda/envs/metawrap-env/bin/metawrap-scripts/plot_binning_results.py and see if it chokes on the import matplotlib line of gets further.

If that works you do not have to re-run the entire module, you can just run the plotting funciton inside your output dir. Something like this: /home/a1654837/.conda/envs/metawrap-env/bin/metawrap-scripts/plot_binning_results.py 50 10 *.stats. Let me know if it works so I can release a patch.

laam21 commented 6 years ago

Thanks for your quick response! I installed xorg-libxrender, and that solved the problem.

ursky commented 6 years ago

Thanks for the feedback. I will include xorg-libxrender as a dependency in metaWRAP v=0.8.4 when it comes out.