RLEReadCounts-class {ChIPseqR} | R Documentation

## Run-length Encoded Read Counts

### Description

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

### Objects from the Class

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

### Slots

`counts`:

  Object of class `"list"` with one component per chromosome, containing a read counts encoded in an object of class `RleList`.

### Extends

Class `"ReadCounts"`, directly.

### Methods

chrLength

  `signature(x = "RLEReadCounts")`: Returns length of all chromosomes represented in `x`.

decompress

  `signature(x = "RLEReadCounts")`: Expands read counts and returns object of class `ReadCounts`.

nreads

  `signature(x = "RLEReadCounts")`: Returns the number of reads on each chromosome, split by strand (if `byStrand` is `TRUE`)

plot

  `signature(x = "RLEReadCounts", y = "missing")`: Generates plots of read counts.

### Author(s)

Peter Humburg

### See Also

`ReadCounts`, `RleList`

### Examples

    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)

[Package ChIPseqR version 1.48.0 Index]