wiki:SOPs/callingSNPs

SNP Calling

mpileup (SAMtools)

  • Create bcf file (binary version of vcf) from alignment file (bam)
  #Use Q to set base quality threshold
  samtools mpileup -Q 25 -ugf <reference.fasta> <file.bam> | bcftools view -bvcg - > accepted_hits.raw.bcf
  #mpileup BAQ computation might be too stringent, disabling BAQ may be needed
  samtools mpileup -B -Q 25 -ugf <reference.fasta> <file.bam> | bcftools view -bvcg - > accepted_hits.raw.bcf
  • Convert bcf to vcf (variant call format) and filter, if needed

  #filter using varFilter (from vcfutils)
  #use Q to set mapping quality
  #use d for minimum read depth
  bcftools view accepted_hits.raw.bcf | vcfutils.pl varFilter -d 5 -Q 20 >| accepted_hits.raw.vcf

GATK Overview

Filtering SNPs

Annotating SNPs

  • Determining the effect of the SNP

snpEff

 #Use appropriate i) organism  and ii) annotation (eg. UCSC, RefSeq, Ensembl)
 #Mouse: mm37 (UCSC/RefSeq), mm37.61 (Ensembl)
 #Human: hg37 (UCSC/RefSeq), hg37.61 (Ensembl)
 #Output is created in several files: an html summary file and text files with detailed information 
 #NOTE: snpEff requires a config file, .snpEff.config; annotating variants on the mitochondria (which has a different codon usage) needs to be specified in the config file, eg.
 #GRCh37.71.genome : Homo_sapiens
 #GRCh37.71.reference : ftp://ftp.ensembl.org/pub/release-71/gtf/
 #GRCh37.71.MT.codonTable = Vertebrate_Mitochondrial

  snpEff GRCh37.71 variants.vcf > variants.annotated.vcf

Resources from the Broad Institute

Note: See TracWiki for help on using the wiki.