Learn R Programming

Repitools (version 1.18.0)

annotationCounts: Counts the number of sequencing reads surrounding supplied annotations

Description

Counts are made in windows with boundaries fixed distances either side of a reference point.

Arguments

Usage

# ANY,data.frame method annotationCounts(x, anno, ...) # ANY,GRanges method annotationCounts(x, anno, up, down, ...)

Details

If the genomic features annotation contains all unstranded features, the up and down distances refer to how far towards the start of a chromosome, and how far towards the end to make the counting window boundaries. If the annotation is all stranded, then the up and down distances are relative to the TSS of the features.

Value

A matrix of counts is returned, one column per sample and one row per row of genomic features supplied.

See Also

annotationBlocksCounts, genomeBlocks

Examples

Run this code
require(GenomicRanges)
  reads <- GRanges(seqnames = rep("chr1", 5),
                   IRanges(c(3309, 4756, 4801, 4804, 5392), width = 36),
                   strand = c('+', '-', '-', '+', '+'))
  genes <- GRanges("chr1", IRanges(5000, 7000), strand = '+')

  annotationCounts(reads, genes, 500, 500, 300)

Run the code above in your browser using DataLab