Changes

From Genome Analysis Wiki
Jump to navigationJump to search
6,451 bytes added ,  18:12, 15 June 2014
Line 5: Line 5:  
=Tools=
 
=Tools=
   −
You can download vt and have some working knowledge of PERL to do stuff that vt does not support.
+
This walkthrough requires  [[vt|vt]].
    +
=Analyses=
   −
=Coding regions=
+
The file generated from the indel calling is a binary version [[http://www.1000genomes.org/wiki/analysis/variant-call-format/bcf-binary-vcf-version-2 BCFv2.1]] of the Variant Call Format (VCF).  BCFv2.1 is more efficient to process as the data is already stored in computer readable format on the hard disk.  It is however not necessarily more compact than VCF4.2 especially when the format fields are rich in details.
   −
The proportion of frameshift Indels amongst coding region indels is a potential indicator of quality.
+
==File Preparation==
   −
=STR =
+
The VCF file you work with should preferably be BCF2.1 compatible.  Here we provide an example in /net/fantasia/home/atks/indel_analysis_tutorial. \\
   −
Annotation of STRs is really important.  Show example of a deceptive single base pair variant
+
To convert to BCF format which will work fast with vt:
    +
 +
 +
  vt view mills.vcf -o mills.bcf
 +
 +
You will encounter an error as the header does not contain contigs.  To fix this, you should construct a complete header for mills.vcf.  This is done for you in mills.with.alt.hdr.*
 +
 +
  vt view mills.with.alt.hdr.vcf -o mills.genotypes.bcf
 +
 +
To index:
 +
 +
  vt index mills.genotypes.bcf
 +
 +
To extract just the site list which is convenient for working with if you are not analysing the genotypes of the individuals
 +
 +
  vt view -s mills.genotypes.bcf -o mills.sites.bcf
 +
 +
To index:
 +
 +
  vt index mills.sites.bcf
 +
 +
You may also work with vcf.gz, just name the output as *.vcf.gz.  But it will be slower with vt.
 +
 +
==Peek==
 +
 +
You can see what you have in the file with:
 +
 
 +
  vt peek mills.genotypes.bcf
 +
 +
You can also focus on a chromosome:
 +
 +
  vt peek mills.genotypes.bcf -i 20
 +
 +
Or with just passed variants:
 +
 +
  vt peek mills.genotypes.bcf -i 20 -f PASS
 +
 +
Or with failed variants:
 +
 +
  vt peek mills.genotypes.bcf -i 20 -f ~PASS
 +
 +
Or with just 1bp indels:
 +
 +
  vt peek mills.genotypes.bcf -i 20 -f "PASS&&DLEN==1"
 +
 +
Or with just 1bp deletions:
 +
 +
  vt peek mills.genotypes.bcf -i 20 -f "PASS&&LEN==-1"
 +
 +
Or with just biallelic 1bp indels:
 +
 +
  vt peek mills.genotypes.bcf -i 20 -f "PASS&&N_ALLELE==2&&LEN==1"
 +
 +
Or with just biallelic 1bp indels that are somewhat rare:
 +
 +
  vt peek mills.sites.bcf -f "PASS&&N_ALLELE==2&&LEN==1&&INFO.AF<0.03"
 +
 +
Or with just biallelic 1bp indels that are somewhat rare with sanity checking:
 +
 +
  vt peek mills.sites.bcf -f "PASS&&N_ALLELE==2&&LEN==1&&INFO.AC/INFO.AN<0.03"
 +
 +
which you will observe discrepancies due to rounding off in AF.  So you should probably use INFO.AC/INFO.AN.
    
==Normalization==
 
==Normalization==
    
Indel representation is not unique, you should normalize them and remove duplicates.
 
Indel representation is not unique, you should normalize them and remove duplicates.
 +
 +
  Variant normalization is implemented in [[vt#Normalization|vt]] and this page explains the algorithm
 +
  and also provides a simple proof of correctness - [[Variant_Normalization|Variant Normalization]]
    
The following table shows the number of variants that had to be normalized and the corresponding  
 
The following table shows the number of variants that had to be normalized and the corresponding  
Line 25: Line 90:  
number of duplicate variants found for some of the 1000 Genomes Trio High Coverage call sets.
 
number of duplicate variants found for some of the 1000 Genomes Trio High Coverage call sets.
 
Although left alignment seems to be a trivial concept, it is easily overlooked and remain a common  
 
Although left alignment seems to be a trivial concept, it is easily overlooked and remain a common  
mistake.  Another example is the Mills et al. data set which followed up with 10004 Indels for validation.
+
mistake.   
Out of 9996 passed variants, it was found that after normalization, only 8904 distinct Indels remain
  −
- about a loss of 11% of variant thought distinct.
  −
 
  −
  Variant normalization is implemented in [[vt#Normalization|vt]] and this page explains the algorithm
  −
  and also provides a simple proof of correctness - [[Variant_Normalization|Variant Normalization]]
      
{| class="wikitable"
 
{| class="wikitable"
Line 104: Line 164:  
|}
 
|}
   −
==Annotation of Indels==
+
Another example is the Mills et al. data set which followed up with 10004 Indels for validation.
 +
Out of 9996 passed variants, it was found that after normalization, only 8904 distinct Indels remain
 +
- about a loss of 11% of variant thought distinct.
 +
 
 +
To normalize and remove duplicate variants:
 +
 
 +
  vt normalize  mills.genotypes.bcf -r ~/ref/vt/grch37/hs37d5.fa  | vt mergedups - -o mills.normalized.genotypes.bcf
 +
 
 +
and you will observe that 3994 variants had to be left aligned and 1092 variants were removed.
    +
  stats: biallelic
 +
          no. left trimmed                      : 0
 +
          no. left trimmed and left aligned    : 0
 +
          no. left trimmed and right trimmed    : 0
 +
          no. left aligned                      : 3994
 +
          no. right trimmed                    : 0 <br>
 +
        multiallelic
 +
          no. left trimmed                      : 0
 +
          no. left trimmed and left aligned    : 0
 +
          no. left trimmed and right trimmed    : 0
 +
          no. left aligned                      : 0
 +
          no. right trimmed                    : 0 <br>
 +
      no. variants observed                    : 9996 <br>
 +
  Time elapsed: 0.14s <br> <br>
 +
  stats: Total number of observed variants  9996
 +
        Total number of unique variants    8904 <br>
 +
  Time elapsed: 0.13s
    +
The following will be slight faster: + denotes using of uncompressed bcf stream. 
   −
==Examining Mendelian Errors==
+
  vt normalize  mills.genotypes.bcf -r ~/ref/vt/grch37/hs37d5.fa -o + | vt mergedups + -o mills.normalized.genotypes.bcf
    +
Also remember to index this file and extract the sites.
   −
==Useful to have call sets from several different callers==
+
==Insertion/Deletion ratios, Coding Regions and Overlap analysis==
    +
You can obtain measure of insertion deletion ratios, coding region indels and sensitivity analysis by using the profile_indels analysis.
 +
 +
  vt profile_indels -g indel.reference.txt -r ~/ref/vt/grch37/hs37d5.fa mills.normalized.sites.bcf
    +
The indel.reference.txt file contains the required reference to perform the overlap analysis.
   −
==Concordance==
+
  data set
 +
    No Indels :      8904 [0.93]  //#variants in your data set [ins/del ratio]
 +
      FS/NFS :      0.66 (67/35)  //Proportion of frameshift Indels. (#Frameshift Indels/#Nonframeshift Indels)<br> 
 +
  dbsnp  //A represents the data set you input, B represents dbsnp
 +
    A-B      2975 [1.06]  //#variants in A only [ins/del ratio]
 +
    A&B      5929 [0.86]  //#variants in A and B
 +
    B-A    2059845 [1.51]
 +
    Precision    66.6%    //A&B/A this represents how novel your data set is in the variants represented.
 +
    Sensitivity  0.3%    //A&B/B this represents sensitivity somewhat if dbsnp is considered a high quality Indel
 +
                          //set and the sample are the same in both data sets. (which they usually are not, this is still
 +
                          //nonetheless a useful indicator)<br>
 +
  mills
 +
    A-B      5705 [0.81]
 +
    A&B      3199 [1.18]
 +
    B-A    203819 [0.98]
 +
    Precision    35.9%
 +
    Sensitivity  1.5% <br>
 +
  mills.chip
 +
    A-B          0 [-nan]
 +
    A&B      8904 [0.93]
 +
    B-A          0 [-nan]
 +
    Precision    100.0%
 +
    Sensitivity  100.0% <br>
 +
  affy.exome.chip
 +
    A-B      8821 [0.93]
 +
    A&B        83 [0.69]
 +
    B-A      34011 [0.47]
 +
    Precision    0.9%
 +
    Sensitivity  0.2%
   −
Can check concordance of genotypes between callers
+
Ins/Del ratios:  Reference alignment based methods tend to be biased towards the detection of deletions.  This provides a useful measure for discovery Indel sets to show the varying degree of biasness.  It also appears that as coverage increases, the ins/del ratio tends to 1.
   −
==Overlapping percentages with known data sets==
+
Coding region analysis:  Coding region Indels may be categorised as Frame shift Indels and Non frameshift Indels.  A lower proportion of Frameshift Indels may indicate a better quality data set but this depends also on the individuals sequenced.
With Mills
  −
with dbSNP
  −
with exome chips
  −
with genotyping chips if available
      +
Overlap analysis:  overlap analysis with other data sets is an indicator of sensitivity.
   −
==Useful stratifying features==
+
* dbsnp: contains Indels submitted from everywhere, I am not sure what does this represent exactly.  But assuming most are real, then precision is a useful estimated quantity from this reference data set.
 +
* Mills:  contains doublehit common indels from the Mills. et al paper and is a relatively good measure of sensitivity for common variants.  Because not all Indels in this set is expected to be present in your sample, this actually gives you an underestimate of sensitivity.
 +
* Mills chip:  This is a subset of the Mills data set.  There are genotypes here that are useful for subsetting polymophic subsets of variants that are present in samples common with your data set, this can potentially provide a better estimate of sensitivity.  In general not very useful unless you happen to be working on 1000 Genomes data or any data set who's individuals are commonly studied.
 +
* Affy Exome Chip:  This contains somewhat rare variants in exonic regions and is useful for exome chip analysis. You should subset your exome data to exome region Indels before comparing against this data set.
   −
AF - rare versus common
+
This analysis supports filters too.
Indel length - computed naively versus tract length
  −
Allele frequency bins
  −
Type of Indels - homopolymer types and STR types and isolated
  −
Adjacent SNPs
  −
Adjacent MNPs
  −
Clumping variants
     −
==Other useful evaluations==
+
==to document==
   −
genotype likelihood concordance
+
* Annotation of STRs is really important.  Show example of a deceptive single base pair variant
concordance stratified by indel length or tract length
+
* Mendelian analysis
mendelian concordance by tract length
+
* AFS
 +
* Can check concordance of genotypes between callers - partitiion
 +
* Type of Indels - homopolymer types and STR types and isolated, Adjacent SNPs ,Adjacent MNPs,Clumping variants
 +
* genotype likelihood concordance
 +
* concordance stratified by indel length or tract length
 +
* mendelian concordance by tract length
1,102

edits

Navigation menu