This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Edit distance of an alignment

I am new to VG.

I have mapped short sequences to a genome graph using vg map. Now I wish to extract sequences from the result GAM file that are mapped to the genome graph with edit distance less or equal to 2.

Is there a (an easy) way to do it?

If I want to extract the perfect matches instead of the ones with edit distance <= 2 , is (.identity==1) the right condition to use?

vg variation graph

1 answer

You are probably best to use the "score" field, as "identity" doesn't take into account gaps. The default scoring parameters are displayed under the "scoring:" section if you run vg map without any arguments. With the defaults, a perfect score is 10 + length of the read.

Log in to answer this question.