Using ShortRead for mapping quality control

The ShortRead package in Bioconductor offers quality control for NGS data from base-calling to mapping. For mapping scores, ShortRead can read several formats, including BAM files generated from samtools. However, it cannot recognize the sorted BAM files.

The R code below plots alignment quality density distribution.

library(ShortRead)
aln <- readAligned(getwd(), 'my.bam', type='BAM')
q <- quality(alignQuality(aln))
densityplot(q[q&bt;1], xlab=’Alignment quality’, plot.points=FALSE, log=’y’)

The plot looks like this:

Alignment quality density distribution

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s