7
$\begingroup$

I downloaded a VCF file from dbSNP, and I'm curious if the indels in the file are left-aligned for GRCH37 genome. The documentation doesn't say anything.

How can we tell if a VCF file has left or right aligned indels?

$\endgroup$

2 Answers 2

6
$\begingroup$

One possibility is to run bcftools norm on the file. At the end it will print out a statistic about how many variants were realigned. I did this for dbSNPv151 (GRCh38) only for chromosome 22 like this:

$ bcftools view -i 'TYPE="indel"' dbSNP_GRCh38.p7_b151.vcf.gz 22|bcftools norm -Ou -f GRCh38.fa > /dev/null
Lines   total/split/realigned/skipped:  901503/0/490/0
$\endgroup$
1
  • $\begingroup$ Hi, although it's too late, would you please let me know which type of human reference genome, toplevel or primary_assembly or something else, is appropriate? $\endgroup$
    – Mary
    Commented Dec 8, 2019 at 18:42
5
$\begingroup$

By definition in the VCF format specification the POS field is left aligned

POS int32 t 0-based leftmost coordinate

To confirm that you VCF is following the standard you would have to look at the reference and the match up the entries in the VCF. However if it is from a reliable source like dbSNP you can probably assume they follow the spec

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.