Psy-Fer / SquiggleKit

SquiggleKit: A toolkit for manipulating nanopore signal data
MIT License
120 stars 23 forks source link

SquigglePull: KeyError: 'Unable to open object (component not found)' help #24

Closed 690645258 closed 4 years ago

690645258 commented 4 years ago

Hi,

I'm trying to extract some direct RNA signal data using SquigglePull, however running the command: <Pathtoinstall>/SquiggleKit/SquigglePull.py -r -p ./ > data.tsv or with events instead I'm getting keyErrors.

With -r I get:

KeyError: 'Unable to open object (component not found)' extract_fast5():failed to extract events or fastq from ./FAL31696_7dc867a7b6d637f50fe45d74580e91ea57e61770_145.fast5main():data not extracted. Moving to next fileTraceback (most recent call last): File "/home/user/tools/SquiggleKit/SquigglePull.py", line 242, in extract_f5 c = hdf['Raw/Reads'].keys() 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/user/miniconda3/lib/python3.7/site-packages/h5py/_hl/group.py", line 262, 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

if I use -e instead I get: `KeyError: "Unable to open object (object 'Analyses' doesn't exist)" extract_fast5():failed to extract events or fastq from ./FAL31696_7dc867a7b6d637f50fe45d74580e91ea57e61770_145.fast5main():data not extracted. Moving to next fileTraceback (most recent call last): File "/home/user/tools/SquiggleKit/SquigglePull.py", line 205, in extract_f5 b = sorted([i for i in hdf['Analyses'].keys() if i[0] == 'B'])[-1] 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/user/miniconda3/lib/python3.7/site-packages/h5py/_hl/group.py", line 262, 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 (object 'Analyses' doesn't exist)" extract_fast5():failed to extract events or fastq from ./FAL31696_7dc867a7b6d637f50fe45d74580e91ea57e61770_3.fast5main():data not extracted. Moving to next file(base)'

I'm running this on ubuntu 18.04 if that makes any difference? Are these meant to be in singles as with tombo or are the raw outputs from MinKnow fine? Any help here would be greatly appreciated!

Psy-Fer commented 4 years ago

Hello, This looks like a multifast5 problem. I'll update the tool with the latest changes and let you know when to try again. Sorry for the inconvenience.

James F.

Psy-Fer commented 4 years ago

Oh, and ubuntu 18 should be fine, I'm 90% sure it's just a multifast5 problem.

Psy-Fer commented 4 years ago

Hello,

I've added a quick fix for raw signal extraction using multifast5 files.

if you run like so python3 SquigglePull.py -p ~/data/deeplexicon/multi_test/ -v --multi > output.tsv

It will hopefully work on your end.

I'll add the other features later on. I hope this helps James

690645258 commented 4 years ago

Hey,

Just tested it and is running nicely now. Thank you so much for the quick fix there, I really appreciate it!

Cheers!

Psy-Fer commented 4 years ago

No worries.

Closing this ticket