annotationBlocksCounts {Repitools} | R Documentation

## Counts the number of sequencing reads within supplied genomic blocks.

### Description

Counts reads inside blocks.

### Usage

      ## S4 method for signature 'ANY,data.frame'
    annotationBlocksCounts(x, anno, ...)
      ## S4 method for signature 'character,GRanges'
    annotationBlocksCounts(x, anno, ...)
      ## S4 method for signature 'GRanges,GRanges'
    annotationBlocksCounts(x, anno, seq.len = NULL, verbose = TRUE)
      ## S4 method for signature 'GRangesList,GRanges'
    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.

### Author(s)

Aaron Statham

### See Also

`annotationCounts`, `genomeBlocks`

### Examples

      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)

[Package Repitools version 1.38.0 Index]