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

I wonder the process of sujecting GAM to BAM. #4485

Open
pioneer-pi opened this issue Dec 24, 2024 · 1 comment
Open

I wonder the process of sujecting GAM to BAM. #4485

pioneer-pi opened this issue Dec 24, 2024 · 1 comment

Comments

@pioneer-pi
Copy link

I check the result of GAM and BAM(suject from the last GAM). I found that the same read map to difference position in GAM and BAM. So I wonder if vg do realign while sujecting GAM to BAM?

@adamnovak
Copy link
Member

The positions in GAM are in graph space (node IDs and offsets), and the positions in BAM are in linear reference space (sequence names and offsets). So they can't be equal because they are different types of thing.

A GAM can carry approximate linear positions in its refpos field, but those are approximations based on the node IDs visited and not base-level start and stop positions, so they won't match the BAM read positions exactly.

vg surject does do some local realignment against the target linear reference when converting reads, because most downstream tools expect an alignment against the BAM's reference and not just the slice of an alignment against the graph that goes through the linear reference. So some material that softclipped in the graph might become aligned after surjection, or visa versa.

Can you provide an example of the GAM position and BAM position you are getting and how they are different, and what you would expect if they were the same?

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