In these exercises we will review some of the functionality for summarizing counts and signal across genomes and within regions.
The example data can be found in the data directory
data/heart.bodyMap.bam data/liver.bodyMap.bam
## [1] "Liver.bam"
## [1] "Heart.bam"
## Liver.bam
## "Liver.bam.bai"
## Heart.bam
## "Heart.bam.bai"
Calculate the coverage from the sorted, indexed BAM files normalised to the total mapped reads per sample.
Plot the coverage for Heart and Liver samples over region Chr12 98,986,183-98,998,558 using ggplot2
## 'select()' returned 1:1 mapping between keys and columns
## 228 genes were dropped because they have exons located on both strands
## of the same reference sequence or on more than one reference sequence,
## so cannot be represented by a single genomic range.
## Use 'single.strand.genes.only=FALSE' to get all the genes in a
## GRangesList object, or use suppressMessages() to suppress this message.
## 'select()' returned 1:1 mapping between keys and columns
## [1] "Liver.bam"
## [1] "Heart.bam"
## Liver.bam
## "Liver.bam.bai"
## Heart.bam
## "Heart.bam.bai"
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 2 rows containing missing values (geom_text).