coverageDiff: Compute the difference in coverage between two objects

Description Usage Arguments Details Value Examples

Description

Computes coverage of sample1 minus coverage of sample2, taking into account that the chromosomes in sample1 and sample2 are not necessarily the same.

Usage

1
coverageDiff(sample1, sample2, chrLength)

Arguments

sample1

Object with reads from sample 1. Typically, a RangedData object.

sample2

Object with reads from sample 2. Typically, a RangedData object.

chrLength

Named vector with chromosome lengths. This can be obtained from the Bioconductor annotation packages, e.g. BSgenome.Dmelanogaster.UCSC.dm3 for drosophila melanogaster, etc.

Details

Computation is restricted to chromosomes in names(chrLength).

Value

SimpleRleList with differences in coverage.

Examples

1
2
3
4
sample1 <- RangedData(IRanges(1:10,11:20),space='chr1')
sample2 <- RangedData(IRanges(1:10,11:20),space=rep(c('chr1','chr2'),each=5))
chrLength <- c(50,25); names(chrLength) <- c('chr1','chr2')
coverageDiff(sample1,sample2,chrLength)

htSeqTools documentation built on May 6, 2019, 3:39 a.m.