nanoporetech / medaka

Sequence correction provided by ONT Research
https://nanoporetech.com
Other
391 stars 73 forks source link

medaka stitch failed #415

Closed isnmn closed 10 months ago

isnmn commented 1 year ago

Hi, I'm trying to use medaka stitch but it fails:

medaka stitch MEDAKA/contigs.hdf NR_racon.fasta NR_medaka.fasta 2023-02-13 14:08:57.714896: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda/lib64:/usr/local/cuda-10.1/lib64:/usr/local/cuda-12.0/lib64:/usr/local/cuda/lib64:/usr/local/cuda-10.1/lib64:/usr/local/cuda-12.0/lib64: 2023-02-13 14:08:57.714919: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. [14:08:58 - DataIndx] Loaded 1/1 (100.00%) sample files. [14:08:58 - DataIndx] Loaded 1/1 (100.00%) sample files. [14:08:58 - DataIndx] Loaded 1/1 (100.00%) sample files. [14:08:58 - DataIndx] Loaded 1/1 (100.00%) sample files. concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/process.py", line 246, in _process_worker r = call_item.fn(*call_item.args, *call_item.kwargs) File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/process.py", line 205, in _process_chunk return [fn(args) for args in chunk] File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/process.py", line 205, in return [fn(*args) for args in chunk] File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/stitch.py", line 65, in stitch_from_probs for s, is_last_in_contig, heuristic in data_gen: File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/common.py", line 543, in trim_samples_to_region yield from samples File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/common.py", line 529, in _trim_ends for sample, last, heuristic in samples: File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/common.py", line 513, in _trim_starts for sample, last, heuristic in samples: File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/common.py", line 443, in trim_samples s1 = next(sample_gen) File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/datastore.py", line 520, in yield_from_feature_files yield ds.load_sample(key) File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/datastore.py", line 316, in load_sample group = self.fh['{}/{}'.format(self._samplepath, key)] 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/idnzl/Desktop/medaka/lib/python3.9/site-packages/h5py/_hl/group.py", line 357, 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 (free block size is zero?)' """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/idnzl/Desktop/medaka/bin/medaka", line 8, in sys.exit(main()) File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/medaka.py", line 724, in main args.func(args) File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/stitch.py", line 229, in stitch contigs, gt = fill_gaps(contigs, args.draft, args.fill_char) File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/stitch.py", line 109, in fill_gaps for info, sequence_parts, qualities in contigs: File "/home/idnzl/Desktop/medaka/lib/python3.9/site-packages/medaka/stitch.py", line 157, in collapse_neighbours contig = next(contigs) File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/process.py", line 562, in _chain_from_iterable_of_lists for element in iterable: File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 609, in result_iterator yield fs.pop().result() File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 446, in result return self.get_result() File "/home/idnzl/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 391, in get_result raise self._exception KeyError: 'Unable to open object (free block size is zero?)'

My files are not corrupted nor empty. I also tried different samples that I stitched before, they are also failing with the same error now! I downloaded both conda and virtualenv-pip, still not working!

cjw85 commented 1 year ago

My files are not corrupted nor empty.

The error:

File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: 'Unable to open object (free block size is zero?)'

is suggestive of the contrary. What happens if you run medaka consensus again to regenerate the contigs.hdf file.

By the way, you can avoid the errors such as:

2023-02-13 14:08:57.714919: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

by installing medaka-cpu rather than medaka; the former uses a version of Tensorflow which do not contain GPU accelerated code.

cjw85 commented 10 months ago

Closing from lack of response.