arq5x / poretools

a toolkit for working with Oxford nanopore data
MIT License
243 stars 89 forks source link

Issue in poretools events: some fields are missing and does not work for poretools events --pre-basecalled #172

Open EPKok opened 6 years ago

EPKok commented 6 years ago

Hi, I ran a command below to check on the events for basecalled fast5:

poretools events / GISPC943_20180505_FAH50484_MN23396_sequencing_run_180505_gblock_GMod3_G_no_ACN_65384_read_1072_ch_158_strand.fast5 | head -5

However, it seems like there are some missing output fields. Is this normal?

file    strand  mean    start   stdv    length  model_state     model_level     move    p_model_state   mp_model_state  p_mp_model_state        p_A     p_C     p_G     p_Traw_index

GISPC943_20180505_FAH50484_MN23396_sequencing_run_180505_gblock_GMod3_G_no_ACN_65384_read_1072_ch_158_strand.fast5      template        78.127495       0       61.87793   15       TTACC           1       0.057130937

GISPC943_20180505_FAH50484_MN23396_sequencing_run_180505_gblock_GMod3_G_no_ACN_65384_read_1072_ch_158_strand.fast5      template        69.83766        15      6.365453   15       TTACC           0       0.0004155113

GISPC943_20180505_FAH50484_MN23396_sequencing_run_180505_gblock_GMod3_G_no_ACN_65384_read_1072_ch_158_strand.fast5      template        100.96724       30      41.298573  15       ACCTA           2       0.34453884

GISPC943_20180505_FAH50484_MN23396_sequencing_run_180505_gblock_GMod3_G_no_ACN_65384_read_1072_ch_158_strand.fast5      template        106.87635       45      13.328592  15       CCTAA           1       0.6374407

when I ran the same command with --pre-basecalled option as below, it gives me error: poretools events --pre-basecalled / GISPC943_20180505_FAH50484_MN23396_sequencing_run_180505_gblock_GMod3_G_no_ACN_65384_read_1072_ch_158_strand.fast5 | head -5

Error:

> Traceback (most recent call last):
>   File "/home/kokep/.local/bin/poretools", line 11, in <module>
> file    strand  mean    start   stdv    length  model_state     model_level     move    p_model_state   mp_model_state  p_mp_model_state        p_A     p_C     p_G     p_Traw_index
>     load_entry_point('poretools==0.6.0', 'console_scripts', 'poretools')()
>   File "/home/kokep/.local/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 "/home/kokep/.local/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 "/home/kokep/.local/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/events.py", line 14, in run
>     for event in fast5.get_pre_basecalled_events():
>   File "/home/kokep/.local/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/Fast5File.py", line 406, in get_pre_basecalled_events
>     self._extract_pre_basecalled_events()
>   File "/home/kokep/.local/lib/python2.7/site-packages/poretools-0.6.0-py2.7.egg/poretools/Fast5File.py", line 912, in _extract_pre_basecalled_events
>     table = self.hdf5file[fastq_paths[self.version]['pre_basecalled']]
>   File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
>   File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
>   File "/home/kokep/.local/lib/python2.7/site-packages/h5py-2.8.0-py2.7-linux-x86_64.egg/h5py/_hl/group.py", line 177, in __getitem__
>     oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
>   File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
>   File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
>   File "h5py/h5o.pyx", line 190, in h5py.h5o.open
> KeyError: 'Unable to open object (component not found)'
> 

I wonder how I could fix this issue. Thanks in advance.

Huanle commented 6 years ago

@BisonKok have you figured out the problem?

Huanle commented 6 years ago

columns in addition to
'mean stdv start length model_state move weights p_model_state mp_state p_mp_state p_A p_C p_G p_T' are empty.