maickrau / GraphAligner

MIT License
261 stars 32 forks source link

combining split alignments #5

Open ekg opened 5 years ago

ekg commented 5 years ago

Would it be difficult to add a tool that merged alignments produced by GraphAligner for a single sequence back into a single alignment for that sequence? Or does a tool like this already exist?

maickrau commented 5 years ago

Doesn't exist as far as I know. Shouldn't be too difficult except for two conceptual questions. How should you handle partial alignments whose merge doesn't create a path, eg the parts are aligned to different regions? And right now the alignments can overlap by a few base pairs, how should that be represented?

ekg commented 5 years ago

It's OK if things split. That's at least supported pretty well in the GAM format. The path of such an alignment isn't necessarily in the graph. vg will do the right thing with these and introduce an apparent SV if you include them via augment.

As for the overlap by a few base pairs, that's kind of similar. The alignment would just appear to loop at the end. This isn't ideal, but it's also supported under the data model.

cgroza commented 4 years ago

Any progress on this issue? I am trying to use graph aligner to perform gapped alignment of long reads and then augment the graph with the insertions. I know I can do it with minimap2 (another minimizer based tool) and it identifies the 300bp insertions very well. Minimap2 does not split the alignment like GraphAligner does. And I wasn't successful with the --global-alignment flag (it produces low quality alignments without any gaps).

Any input on how to do this would be appreciated (maybe vg can do it)?

ekg commented 4 years ago

vg does do the splitting, but it's slow. (Rather than try to improve it's behavior for long reads, I'm inclined to develop a new aligner.)

What's needed here is a kind of hierarchical chaining of the candidate sub-alignments. That's at least how vg does it, and it seems to work OK.

On Thu, Oct 8, 2020, 20:53 Groza Cristian notifications@github.com wrote:

Any progress on this issue? I am trying to use graph aligner to perform gapped alignment of long reads and then augment the graph with the insertions. I know I can do it with minimap2 (another minimizer based tool) and it identifies the 300bp insertions very well. Minimap2 does not split the alignment like GraphAligner does. And I wasn't successful with the --global-alignment flag (it produces low quality alignments without any gaps).

Any input on how to do this would be appreciated (maybe vg can do it)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maickrau/GraphAligner/issues/5#issuecomment-705758529, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDQEIYN265TQJA5FSFMSDSJYDBFANCNFSM4I67YRNQ .