arq5x / poretools

a toolkit for working with Oxford nanopore data
MIT License
242 stars 90 forks source link

poretools occupancy - unable to find start times #124

Open webbchen opened 7 years ago

webbchen commented 7 years ago

Hello,

poretools occupancy seems to be unable to find the start times for the pores from the fast5 files.

I ran: me@server$ poretools occupancy lambda_reads/epi2me_calls/pass/ --plot-type total_bp --saveas lambda2D_poreoccupancy.png

and got: " channel_number start_time duration ERROR:poretools:int() argument must be a string or a number, not 'NoneType' Traceback (most recent call last): File "/home/me/.local/bin/poretools", line 11, in load_entry_point('poretools==0.6.0', 'console_scripts', 'poretools')() File "/data/software/Python/anaconda2/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/poretools_main.py", line 538, in main args.func(parser, args) File "/data/software/Python/anaconda2/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/poretools_main.py", line 55, in run_subtool submodule.run(parser, args) File "/data/software/Python/anaconda2/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/occupancy.py", line 63, in run start_time = fast5.get_start_time() File "/data/software/Python/anaconda2/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/Fast5File.py", line 570, in get_start_time return int(exp_start_time) + int(node.attrs['start_time']) TypeError: int() argument must be a string or a number, not 'NoneType' " Any suggestions?

aminards commented 7 years ago

See my fix for a similar issue #127