Learn R Programming

Repitools (version 1.18.0)

annotationBlocksCounts: Counts the number of sequencing reads within supplied genomic blocks.

Description

Counts reads inside blocks.

Usage

"annotationBlocksCounts"(x, anno, ...) "annotationBlocksCounts"(x, anno, ...) "annotationBlocksCounts"(x, anno, seq.len = NULL, verbose = TRUE) "annotationBlocksCounts"(x, anno, ...)

Arguments

x
A character vector of BAM paths, a GRangesList, or GRanges object.
anno
A set of genomic features to make windows around a reference point of theirs. Either a data.frame with (at least) colums chr, start, and end, or a GRanges object.
seq.len
If sequencing reads need to be extended, the fragment size to be used. Default: NULL (no extension).
verbose
Whether to print progress. Default: TRUE.
...
Parameters described above, that are not used in the top-level error-checking stage, but are passed further into a private function that uses them in its processing.

Value

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

See Also

annotationCounts, 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 = '+')
  annotationBlocksCounts(reads, genes, 300)

Run the code above in your browser using DataLab