marcus1487 / nanoraw

Genome guided re-segmention and visualization for raw nanopore sequencing data.
https://pypi.python.org/pypi/nanoraw
Other
46 stars 9 forks source link

Why my data didn't have this attribute? #60

Closed omegahh closed 5 years ago

omegahh commented 5 years ago

2018-11-18 22 55 45

As the screenshot shows, when it runs the line 832 in resquiggle.py

It seems like picture is too large to load normally, here is code:

.... #long output via data.visit(print)
Raw
Raw/Reads
Raw/Reads/Read_355
Raw/Reads/Read_355/Signal
UniqueGlobalKey
UniqueGlobalKey/channel_id
UniqueGlobalKey/context_tags
UniqueGlobalKey/tracking_id

[60]: raw_attrs = dict(data['/Raw/Reads/'].values()[0].attrs.items())
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-60-40ebc30d13f7> in <module>
----> 1 raw_attrs = dict(data['/Raw/Reads/'].values()[0].attrs.items())

TypeError: 'ValuesViewHDF5' object does not support indexing
omegahh commented 5 years ago

This error is raised because I use Python3, which make values() methods return a view-like object instead of lists.