User Tools

Site Tools


mkatari-bioinformatics-august-2013-bioinformatics-august-2013-mpileup

This is an old revision of the document!


Back to Manny's Bioinformatics Workshop Home

Identifying SNPs using mpileup

A quick way to call SNPs is to use mpileup which is one of the tools provided by samtools. However if you want control over your results, consider the GATK pipeline found Processing files and Running GATK|here. The steps to process the file are almost the same compared to the GATK pipeline, however mpileup allows you to provide the different groups (Read Groups) as separate bam files as well.Below is a recommended pipeline when working with mpileup.

First create the bowtie index files for alignment.

module load bowtie2
module load samtools

bowtie2-build PTC_Human.fasta PTC_Human
samtools faidx PTC_Human.fasta

The following steps have to executes for all samples

  • align using Bowtie2
  • convert to bam
  • sort the bam
  • remove duplicates
  • create a bam index for dedup bam files

For further curation

  • realign indels within each samples

Once they are all processed you can create read groups for all the samples and then merge then into one file. This is not necessary for mpileup but it is for GATK. So if you are planning to use both methods it is not a bad idea.

  • create read groups
  • merge all samples to one bam file
  • sort and index this merged bam file

Running mpileup assuming no read groups and not merged

  • run mpileup
  • convert bcf to vcf
  • filter using vcfutils
  • index vcf file to visualize on IGV
bowtie2 -x PTC_Human -U Cohen.fastq -S Cohen.sam
samtools view -bS Cohen.sam > Cohen.bam
samtools sort 
mkatari-bioinformatics-august-2013-bioinformatics-august-2013-mpileup.1427982802.txt.gz · Last modified: 2015/04/02 13:53 by mkatari