Psy-Fer / SquiggleKit

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

SquigglePlot.py cannot open imported single fast5 file #31

Closed defectsnow closed 4 years ago

defectsnow commented 4 years ago

Although running SquigglePlot.py individual on the test.fast5 provided in the example code works and plots just fine, I receive an error for every imported and personal .fast5 file not provided.

I receive the following error:

Traceback (most recent call last):
  File "SquigglePlot.py", line 327, in process_fast5
    c = list(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/defectsnow/SquiggleKit36/lib/python3.6/site-packages/h5py/_hl/group.py", line 264, 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)'

Notably, this is very similar to an error recently posted by nickschurch, though the fix does not seem to work for my issue. I ensured that the fix was in the code, and it was, and am unsure what to try next.

Psy-Fer commented 4 years ago

Hello,

Could you please past in the command you used?

Also, how old/new is that fast5 data?

Thanks

defectsnow commented 4 years ago

The command I used was python3 SquigglePlot.py -i ~/data/test.fast5

I get the same result for python as well.

The fast5 data is from mid-October of 2019.

Psy-Fer commented 4 years ago

Hello,

Is this a multi fast5 file? if so, please try with the -m/--multi flag

cheers

defectsnow commented 4 years ago

Rearranged the data to see if that was it, so ignore different file paths.

python3 SquigglePlot.py -mi ~/data/fast5_pass/testing.fast5 gives me:

File "SquigglePlot.py", line 365, in <module>
    main()
  File "SquigglePlot.py", line 229, in main
    sig = sigs[args.readID]
KeyError: None

I am not familiar enough with python yet to see why this would give an error.

defectsnow commented 4 years ago

My mistake, was using -i for multi_fast5s instead of just using -p for the general path. Misunderstood the flags -- and if I was using multis or not. Thank you for the help!