Monday, 2 March 2020

How to validate a bam file



Hello

I will cover on how to quick check our BAM file after mapping/alignment process.

In my case, I use BWA as for the mapping process of WGS data.

To validate our BAM file, first we need to install Picard tool, developed by Broad Institutes (https://broadinstitute.github.io/picard/). I will use Bioconda to install Picard


#quick check on bam file

$ conda create -n Picard python=3.7
$ conda activate Picard
$ conda install -c bioconda picard

$ picard -h
$ ValidateSamFile -h

#test one file
$ picard ValidateSamFile I=/path/to/bam/file/SRR030257.bam MODE=SUMMARY

#you can see warning or error on the terminal


Solution:

We must add Read Group information to our dataset using Picard utility before proceed with the next step.

No comments:

Post a Comment