ekg / seqwish

alignment to variation graph inducer
MIT License
143 stars 18 forks source link

Assertion `occs.size() == 1' failed #1

Closed fbemm closed 6 years ago

fbemm commented 6 years ago

Hey,

I am trying to align 4 times 40Mb stored in a combined fasta with seqwish and get the following:

seqindex.cpp:184: size_t seqwish::seqindex_t::rank_of_seq_named(const string&): Assertion 'occs.size() == 1' failed.

Any idea where to start debugging?

Thx, F

apregier commented 6 years ago

I just encountered the same issue. It seems that the 'locate' API returns entries where the query is a substring of the contig name (i.e. query of ">1" will return both ">1" and ">11". Unfortunately I am not seeing an easy fix with the sdsl API (although I might be missing something). Workaround would be to assign sequence names that are not substrings of each other.

fbemm commented 6 years ago

That is indeed the problem. I encoded seq ids as sha for now and it seems to work.

ekg commented 6 years ago

Thank you both for uncovering this mistake! The fix in seqwish should be easy. We just need to append a " " to the search string.

On Thu, Oct 18, 2018, 09:21 Felix Bemm notifications@github.com wrote:

That is indeed the problem. I encoded seq ids as sha for now and it seems to work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ekg/seqwish/issues/1#issuecomment-430919486, or mute the thread https://github.com/notifications/unsubscribe-auth/AAI4EW5muek663GuNh2uHZTXG77b4BOGks5umDomgaJpZM4Xboou .

ekg commented 6 years ago

I was able to reproduce this, so I expect it to resolve your problems as well. Let me know if otherwise.

VidJa commented 5 years ago

I'm running into this same issue, even after using the sha256 hashes from each sequence as sequence IDs I've compiled from today's master

seqindex.cpp:210: size_t seqwish::seqindex_t::rank_of_seq_named(const string&): Assertion `occs.size() == 1' failed.

ekg commented 5 years ago

Would you be able to share a minimap test case that reproduces this? This error could have other causes.

On Tue, Sep 17, 2019 at 4:44 PM VidJa notifications@github.com wrote:

I'm running into this same issue, even after using the sha256 hashes from each sequence as sequence IDs I've compiled from today's master

seqindex.cpp:210: size_t seqwish::seqindex_t::rank_of_seq_named(const string&): Assertion `occs.size() == 1' failed.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ekg/seqwish/issues/1?email_source=notifications&email_token=AABDQEN6N76OLCWPEF6TVMLQKDULLA5CNFSM4F3ORIXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD64YUFI#issuecomment-532253205, or mute the thread https://github.com/notifications/unsubscribe-auth/AABDQEPH2XX5BN24VI6OQM3QKDULLANCNFSM4F3ORIXA .

VidJa commented 5 years ago

Hi Erik, just to let you know I got it working. I was using multiple -s on the commandline, but collapsing them in one files made it work.

ekg commented 5 years ago

Great!

On Fri, Nov 1, 2019 at 11:13 AM VidJa notifications@github.com wrote:

Hi Erik, just to let you know I got it working. I was using multiple -s

on the commandline, but collapsing them in one files made it work. — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub , or unsubscribe .