fastSTRUCTURE, errors when run distruct.py

360 views
Skip to first unread message

zhangd...@126.com

unread,
Feb 23, 2016, 9:09:24 PM2/23/16
to structure-software
I am using fastSTRUCTURE, it performs quite well. But I got troubles in the last step for generating a Distruct plot.

Here is my command:
python distruct.py -K 3 --input=plink_simple --popfile=pop --output=plink_simple_distruct.svg

and here is the program reporting error:

File "distruct.py", line 169, in <module>
figure = plot_admixture(admixture, population_indices, population_labels, title)
File "distruct.py", line 15, in plot_admixture
figure = plot.figure(figsize=(5,3))
File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 435, in figure
**kwargs)
File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 47, in new_figure_manager
return new_figure_manager_given_figure(num, thisFig)
File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 54, in new_figure_manager_given_figure
canvas = FigureCanvasQTAgg(figure)
File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 72, in __init__
FigureCanvasQT.__init__(self, figure)
File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py", line 68, in __init__
_create_qApp()
File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 138, in _create_qApp
raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable


Am I install something wrong?

Thanks a lot for your attention, looking forward to your reply very much!
sincerely,
Zhang

Vikram Chhatre

unread,
Feb 23, 2016, 9:14:41 PM2/23/16
to structure-software
First try with the example data provided with the script.  If you can't get that working, there is a problem with the Python installation.

V


--
You received this message because you are subscribed to the Google Groups "structure-software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

zhangd...@126.com

unread,
Feb 23, 2016, 10:14:27 PM2/23/16
to structure-software
Thank you for your reply very much!
Almost the same errors when input example data. 

Traceback (most recent call last):
  File "distruct.py", line 169, in <module>
    figure = plot_admixture(admixture, population_indices, population_labels, title)
  File "distruct.py", line 15, in plot_admixture
    figure = plot.figure(figsize=(5,3))
  File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.py", line 435, in figure
    **kwargs)
  File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 47, in new_figure_manager
    return new_figure_manager_given_figure(num, thisFig)
  File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 54, in new_figure_manager_given_figure
    canvas = FigureCanvasQTAgg(figure)
  File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4agg.py", line 72, in __init__
    FigureCanvasQT.__init__(self, figure)
  File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py", line 68, in __init__
    _create_qApp()
  File "/home/yin/bin/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5.py", line 138, in _create_qApp
    raise RuntimeError('Invalid DISPLAY variable')
RuntimeError: Invalid DISPLAY variable


You said there maybe some problems with python,
Is there any preconditions for running distruct.py? because I only installed fastStructure followed the manual page.

在 2016年2月24日星期三 UTC+8上午10:14:41,Vikram Chhatre写道:
To unsubscribe from this group and stop receiving emails from it, send an email to structure-software+unsub...@googlegroups.com.

Vikram Chhatre

unread,
Feb 23, 2016, 10:29:10 PM2/23/16
to structure-software
You may be missing some python modules.  Check the github page for all things that need to be properly installed.

V

To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To post to this group, send email to structure...@googlegroups.com.
Visit this group at https://groups.google.com/group/structure-software.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "structure-software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages