Learn R Programming

ChIPseqR (version 1.26.0)

RLEReadCounts-class: Run-length Encoded Read Counts

Description

This class provides a memory efficient representation of strand specific read counts.

Arguments

Objects from the Class

Objects can be created by calls of the form ReadCounts(counts, names, compress = TRUE) or by calls to strandPileup.

Extends

Class "ReadCounts", directly.

See Also

ReadCounts, RleList

Examples

Run this code
showClass("RLEReadCounts")

## generate some very simple artificial read data
set.seed(1)
fwd <- sample(c(50:70, 250:270), 30, replace=TRUE)
rev <- sample(c(197:217, 347:417), 30, replace=TRUE)
## create data.frame with read positions as input to strandPileup
reads <- data.frame(chromosome="chr1", position=c(fwd, rev), 
	length=25, strand=factor(rep(c("+", "-"), times=c(30, 30))))

## create object of class ReadCounts
readPile <- strandPileup(reads, chrLen=500, extend=1, plot=FALSE, compress=TRUE)

names(readPile)
length(readPile)
sapply(readPile, sum)

Run the code above in your browser using DataLab