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

unitig mapping: Assertion `p1mp->position().node_id() == p2mp->position().node_id()' failed #44

Closed
mlin opened this issue Jun 10, 2015 · 4 comments

Comments

@mlin
Copy link
Member

mlin commented Jun 10, 2015

I'm running vg map on some paired-end reads now, appears to be going smoothly.

I'd previously tried it on some @lh3 fermikit unitigs and hit the following:

$ time vg/vg map -f mlin_unitigs.mag.gz -d wg.index.k27e11 -t 32 -FX 1.9 >aln.gam
vg: path.cpp:510: vg::Path vg::merge_paths(const vg::Path&, const vg::Path&, int&, int&): Assertion `p1mp->position().node_id() == p2mp->position().node_id()' failed.
Aborted

real    0m12.258s
user    0m11.355s
sys     0m2.657s

Here are the first couple unitigs from mlin_unitigs.mag.gz:

@374566:656953435       108     .       1079017880,56;1596667180,64;2213272247,65;2213272249,65;
AAAAAAAGAAAGAAAAAGAGAGAGAGAAAATAAAAGAAAATTAATATCATTGGCTGTTTTTAAGTTCATCTTTCCCTCCTCTGTCATCTCACAGGTATTAGTAAGAACCGCTGTTACACTGCGTGCCACACTGAATTTCAACTATCCCTCTATCTGCTTTGTCTTCTCTCCCAGCCAGTAAGCTACTAAATGATTTTGGATGAATAAATAAACATCTAGGAATGGGAAAGAGAGCAAAATTGAACAAATAGTAATGAATTAGAGTAATCCTTTAAAAGGTGGAAATTATTGGAACAGATATGCAGTTTAAATAAGTTGCAGACTAAGATAGCAGCATAAAACATACAGGAATATGGCCGGGCGCGGTGGCTCAAGCCTGTAATCCCAGCACTTTGG
+
'''''((()*****++++++++,,,-..///////012234556667777888899:::;;;<<<<<<=====>>>>??@@ABBCCCDDDEEDEEEEEEFFFFFFEEEDCCCCDCDDEEEEEDEEDCCBBBBCCDCBAA@?>>===<<<<;;;<;;;;;::;::;<<<;<<<<;;;<;;:::9988887766667776665677888889::::::;::;<<==>>???@@A@@?@ABBBCDEEEEEEEEFGGGHHHIIJJIIIHGGHHGGGGGGGFGGGFFFGGGGFFFFFFFFGFGGFFFEEDEEEFEDEEDEDCDDCBCBA@@???>>>>>>=<;;;:988888888766544322111111110000000000////..----------,+*
@2445285:1581873033     5       1497293684,98;1884040499,93;    189839833,99;434191570,89;1562090913,91;1633644090,82;
AAAAAAAAAAAGTCATGGGAGAGGATGGTAAAGCTAAGTATCTTTTGCACCTACTCCCCAGCCCCACCACTGCAGAAGCTGAAGGGGTTCCTAGAGGCTTCTTCTGCC
+
""###$%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%$$$#""
@mlin
Copy link
Member Author

mlin commented Jun 29, 2015

I've found one unitig, slightly over 3kbp, that provokes the problem:

$ time vg/vg map -f <(curl -s https://gist.githubusercontent.com/mlin/eae33d216756c47efd3f/raw/f0cce2f1e5026b0517026a364268ccd5657a7d81/2086553952_1469228759.mag | gzip -c) -d wg.index.k27e11 -t 1 -FX 1.9 > unitigs.gam
vg: path.cpp:510: vg::Path vg::merge_paths(const vg::Path&, const vg::Path&, int&, int&): Assertion `p1mp->position().node_id() == p2mp->position().node_id()' failed.
Aborted

real    0m15.176s
user    0m12.821s
sys     0m2.150s

This is with e017b30 (however, the index was built with an earlier version)

@ekg
Copy link
Member

ekg commented Jul 9, 2015

For what it's worth, I've fixed some alignment problems since then, so I'm going to start by just testing the current version.

That said, the "banded" alignment method used for longer contigs is not ideal and probably I should rethink it.

@ekg
Copy link
Member

ekg commented Jul 9, 2015

You can work around this by adding -B 10000 to the mapping code. This sets the band with larger than your read. However, it shouldn't be failing in the first place if the banding is implemented correctly.

@ekg
Copy link
Member

ekg commented Jul 9, 2015

Problem found. I'm not handling reversed alignments properly. I'll resolve and add tests for banded alignments in the reverse direction.

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