Open igordot opened 8 years ago
This seems to be en error related to matplotlib rather then poretools. This happens when you are running a headless system (that is no display connected) or if you are ssh'ing into a system and don't have X-forwarding setup. I was able to get this to run by following the directions given here http://stackoverflow.com/questions/2801882/generating-a-png-with-matplotlib-when-display-is-undefined which basically involved finding the .matplotlibrc and making a setting change to make this permanent.
I encountered this same error and fixed by editing the scripts directly (with help from this page), changing the order that matplotlib is imported relative to the other libraries:
/usr/local/lib/python2.7/dist-packages/poretools-.0.5.1-py2.7.egg/poretools/hist.py
import sys
import time
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import seaborn as sns
import Fast5File
import logging
/usr/local/lib/python2.7/dist-packages/poretools-.0.5.1-py2.7.egg/poretools/yield_plot.py
import Fast5File
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
#logging
import logging
Here's a tutorial I wrote that includes poretools, with this fix in the middle: http://angus.readthedocs.io/en/2016/analyzing_nanopore_data.html
Hi @ljcohen, do you mean delete the "#" before matplotlib.use('Agg') in both files? I tried, but it still not working. Any suggestion? Thank you!
~/opt/poretools/test_data$ poretools squiggle --saveas pdf 2016_3_4_3507_1_ch13_read1474_strand.fast5
/usr/local/lib/python2.7/dist-packages/IPython/html.py:14: ShimWarning: The IPython.html
package has been deprecated. You should import from notebook
instead. IPython.html.widgets
has moved to ipywidgets
.
"IPython.html.widgets
has moved to ipywidgets
.", ShimWarning)
Traceback (most recent call last):
File "/home/wzylin/opt/poretools/poretools/scripts/poretools", line 5, in
I am trying to run
poretools hist
remotely, but it fails due to display error:I thought that adding
--saveas
would prevent that, but it doesn't. Is there any way to get around that?