GraphAligner icon indicating copy to clipboard operation
GraphAligner copied to clipboard

Error when mapping reads to graph.

Open champ1994 opened this issue 3 years ago • 1 comments

I tried to map reads to a graph, but following types of error was generated:

A) src/GraphAlignerBitvectorBanded.h:537: Assertion 'currentSlice.node(i).minScore <= currentSlice.node(i).startSlice.scoreEnd' failed. Read: b2c 3662f-0c55-44f9-a112-6a2442ada525. Seed: 0+,0,0,0

B) src/GraphAlignerBitvectorCommon.h:1118: Assertion 'previous.node(neighbor).endSlice.scoreEnd >= scoreHere-(eq?0:1)' failed. Read: 50ccb189-b12 9-4637-89c4-ed837b4c8376. Seed: 0+,0,0,0

There were 4 more reads for which error A was produced and 2 more reads for which error B was produced. What do these error mean ? How to avoid them ?

Also, for some reads large number of multiple alignment is generated, even when --multimap-score-fraction is set to 1. How can I get only the single best alignment for each read ?

champ1994 avatar Apr 10 '22 09:04 champ1994

The errors look like GraphAligner bugs. Those reads will not have alignments in the output but other reads will not be affected. Could you please upload the graph and the reads which had an error?

A read can have multiple alignments with --multimap-score-fraction 1 if those alignments are in different parts of the read, or if there are multiple exactly equally good alignments. There's no way in GraphAligner to pick only the single best alignment. You will have to filter the lines in the output gaf by picking the ones with highest alignment score (tag AS:f:, column 14)

maickrau avatar Apr 11 '22 16:04 maickrau