rrwick / Unicycler

hybrid assembly pipeline for bacterial genomes
GNU General Public License v3.0
566 stars 131 forks source link

Assertion Error during Applying bridges phase #157

Open bmichanderson opened 5 years ago

bmichanderson commented 5 years ago

Hi Dr. Wick, Thanks for providing a great tool for assembly! I've been trying to use your program in a slightly different application (organellar genomes for plants), and have had some success. I recently ran into a strange error that I don't understand. Note: I'm running Unicycler in a Singularity container on a HPC system (see my github page for the recipe). The run seems to be going fine, but when it gets to the Applying bridges phase, I receive this error:

Traceback (most recent call last):
  File "/usr/local/bin/unicycler", line 11, in <module>
    load_entry_point('unicycler==0.4.8b0', 'console_scripts', 'unicycler')()
  File "/usr/local/lib/python3.6/dist-packages/unicycler/unicycler.py", line 178, in main
    args.min_bridge_qual)
  File "/usr/local/lib/python3.6/dist-packages/unicycler/assembly_graph.py", line 1291, in apply_bridges
    self.apply_bridge(bridge, right_bridged, left_bridged, seg_nums_used_in_bridges)
  File "/usr/local/lib/python3.6/dist-packages/unicycler/assembly_graph.py", line 1328, in apply_bridge
    start_seg.trim_from_end(bridge.start_overlap)
  File "/usr/local/lib/python3.6/dist-packages/unicycler/assembly_graph_segment.py", line 141, in trim_from_end
    assert self.get_length() >= amount

The version is 0.4.8b from about 10 days ago. The assembly is using paired end short reads and a set of PacBio long reads (hybrid). I'll attach the Unicycler log (which doesn't show the error) for completeness. unicycler.log Let me know if I can provide any other information to help you figure out what's going on.

Cheers, Ben

Niicii commented 4 years ago

Dear all,

I seem to have the same error which also doesn't appear in the log file:

Traceback (most recent call last):
  File "/home/wenzel/anaconda3/bin/unicycler", line 11, in <module>
    load_entry_point('unicycler==0.4.8', 'console_scripts', 'unicycler')()
  File "/home/wenzel/anaconda3/lib/python3.7/site-packages/unicycler/unicycler.py", line 178, in main
    args.min_bridge_qual)
  File "/home/wenzel/anaconda3/lib/python3.7/site-packages/unicycler/assembly_graph.py", line 1295, in apply_bridges
    self.apply_bridge(bridge, right_bridged, left_bridged, seg_nums_used_in_bridges)
  File "/home/wenzel/anaconda3/lib/python3.7/site-packages/unicycler/assembly_graph.py", line 1337, in apply_bridge
    end_seg.trim_from_start(bridge.end_overlap)
  File "/home/wenzel/anaconda3/lib/python3.7/site-packages/unicycler/assembly_graph_segment.py", line 151, in trim_from_start
    assert self.get_length() >= amount
AssertionError

I'm trying to use Unicycler v0.4.8 for generating reassemblies from reads mapping to metagenome bins. I use the hybrid mode supplying Illumina paired-end and Nanopore reads. Coverage for both is quite high (>1000x).

If you found out what causes the error I would be very happy to hear. If I can supply additional information, just let me know.

Best wishes, Laura