vgteam / vg

tools for working with genome variation graphs
https://biostars.org/tag/vg/
Other
1.08k stars 191 forks source link

I have a question about GAM to BAM. #4195

Closed pioneer-pi closed 6 months ago

pioneer-pi commented 6 months ago

Using vg to map reads, we can get a gam file. We can use vg surject to change a gam file to a bam file. I want to know the information that lost(change) in this process. It means what's the difference between original gam file and bam file?

jeizenga commented 6 months ago

The algorithm in vg surject tries to keep as much of the graph alignment as possible. The portions of the alignment that lie off of the reference path will be realigned to the reference, but the portions that were already on the reference path are preserved. If an alignment does not overlap the reference path at all, then it will be lost in the conversion.