Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Link iteration failed (incorrect metadata checksum after all read attempts) #279

Open
billytcl opened this issue May 4, 2022 · 1 comment

Comments

@billytcl
Copy link

billytcl commented May 4, 2022

I'm running megalodon 2.4.0 with guppy 5.0.16 and I got this error in the middle of one of my runs:

[2022-05-03 20:26:29.855705] [0x00007f4ffb454700] [info]    Connected to server as ''. Connection id: 3ce45a35-7b1d-4d24-a487-4afc3fc701f8
Exception in thread ReadEnumThread000:
Traceback (most recent call last):
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/site-packages/megalodon/fast5_io.py", line 296, in _fill_files_file_enum_worker
    file_read_ids = get_read_ids(fast5_fn)
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/site-packages/megalodon/fast5_io.py", line 32, in get_read_ids
    return fast5_fp.get_read_ids()
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/site-packages/ont_fast5_api/multi_fast5.py", line 31, in get_read_ids
    return [group_name[5:] for group_name in self.handle if group_name.startswith('read_')]
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/site-packages/ont_fast5_api/multi_fast5.py", line 31, in <listcomp>
    return [group_name[5:] for group_name in self.handle if group_name.startswith('read_')]
  File "/home/groups/hanleeji/megalodon_2.4.0_env/lib/python3.8/site-packages/h5py/_hl/group.py", line 448, in __iter__
    for x in self.id.__iter__():
  File "h5py/h5g.pyx", line 128, in h5py.h5g.GroupIter.__next__
  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/h5l.pyx", line 316, in h5py.h5l.LinkProxy.iterate
RuntimeError: Link iteration failed (incorrect metadata checksum after all read attempts)

It's still continuing, so I'm not sure what's going on. Is it a corrupt fast5? How can I check which one it failed on?

@marcus1487
Copy link
Collaborator

This certainly looks like a corrupt FAST5 file. I'm not aware of a simple way to identify the corrupt FAST5 file. There are catches for corrupted files at the signal extraction stage of processing, but not at the read id enumeration stage. I'll add a bit of code to catch this error and skip such corrupt files, but don't have a workaround for now unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants