Answers.Body: <p>By definition in the <a href="https://samtools.github.io/hts-specs/VCFv4.3.pdf" rel="noreferrer">VCF format specification</a> the POS field is left aligned </p>
  
  <blockquote>
    <p>POS int32 t 0-based leftmost coordinate</p>
  </blockquote>
  
  <p>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 </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-23T05:26:59.587Z
Answers.LastActivityDate: 2019-01-23T05:26:59.587Z
Answers.UserDisplayName: Bioathlete
Answers.Body: <p>One possibility is to run <a href="http://www.htslib.org/doc/bcftools.html#norm" rel="noreferrer">bcftools norm</a> 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:</p>
  
  <pre><code>$ bcftools view -i 'TYPE="indel"' dbSNP_GRCh38.p7_b151.vcf.gz 22|bcftools norm -Ou -f GRCh38.fa &gt; /dev/null
  Lines   total/split/realigned/skipped:  901503/0/490/0
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-08T18:42:00.200Z
Answers.Text: 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?
Answers.UserDisplayName: Mary
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-23T08:24:07.100Z
Answers.LastActivityDate: 2019-01-23T08:24:07.100Z
Answers.UserDisplayName: finswimmer
Body: <p>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.</p>
  
  <p>How can we tell if a VCF file has left or right aligned indels?</p>
  
Tags: <phylogenetics><vcf><indel>
Title: How to check if indels in VCF files are left or right aligned?
ThreadText: # How to check if indels in VCF files are left or right aligned?
  
  (Asked by: username_0 on 2019-01-23)
  
  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?
  
  **Tags:** phylogenetics, vcf, indel
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-01-23. Score: 6
  
  One possibility is to run [bcftools norm](http://www.htslib.org/doc/bcftools.html#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
  
  ```
  
  > **Comments:**
  > **username_3**: 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?  
  
  ---
  
  ### Answer by username_1 on 2019-01-23. Score: 5
  
  By definition in the [VCF format specification](https://samtools.github.io/hts-specs/VCFv4.3.pdf) 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
  
  
  ---
  
  