Roth-Lab / pyclone

Probabilistic model for inferring clonal population structure from deep NGS sequencing.
https://bitbucket.org/aroth85/pyclone/wiki/Home
Other
98 stars 36 forks source link

RuntimeError: Invalid DISPLAY variable #3

Closed biolxy closed 6 years ago

biolxy commented 6 years ago

When I was running the examples file

PyClone run_analysis_pipeline --in_files SRR385938.tsv SRR385939.tsv SRR385940.tsv SRR385941.tsv --working_dir ./tt  --num_iters 1000 

an error was reported:

Traceback (most recent call last):
  File "/home/lixy/miniconda2/envs/ngs2/bin/PyClone", line 11, in <module>
    load_entry_point('PyClone==0.13.1', 'console_scripts', 'PyClone')()
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/pyclone/cli.py", line 78, in main
    args.func(args)
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/pyclone/run.py", line 97, in run_analysis_pipeline
    args.thin
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/pyclone/run.py", line 409, in _cluster_plot
    samples=samples,
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/pyclone/post_process/plot/clusters.py", line 58, in density_plot
    fig = pp.figure(figsize=(width, height))
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 534, in figure
    **kwargs)
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 170, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 176, in new_figure_manager_given_figure
    canvas = cls.FigureCanvas(figure)
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.py", line 35, in __init__
    super(FigureCanvasQTAggBase, self).__init__(figure=figure)
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 235, in __init__
    _create_qApp()
  File "/home/lixy/miniconda2/envs/ngs2/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 122, in _create_qApp
    raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variabl

Any help? Thank you very much!

aroth85 commented 6 years ago

Please check user group (https://groups.google.com/forum/#!forum/pyclone-user-group) for threads on this.

biolxy commented 6 years ago

@aroth85 Thank you very much! I finally found the reason by [](https://groups.google.com/forum/#!forum/pyclone-user-group) now I want to record the process of solving the problem:

  1. When you see the problem above, indicate that you have a problem with your configuration file(matplotlibrc)
  2. find you matplotlibrc file by command:
>>> import matplotlib
>>> matplotlib.matplotlib_fname()
'/home/foo/.config/matplotlib/matplotlibrc'
  1. Edit your matplotlibrc ( line 44 of the file) :
vim /home/foo/.config/matplotlib/matplotlibrc :
# backend      : qt5agg
backend      : Agg

It works in my machine ! thanks again @aroth85