Learn R Programming

Repitools (version 1.18.0)

blocksStats: Calculate statistics for regions in the genome

Description

For each region of interest or TSS, this routine interrogates probes or sequence data for either a high level of absolute signal or a change in signal for some specified contrast of interest. Regions can be surroundings of TSSs, or can be user-specified regions. The function determines if the start and end coordinates of anno should be used as regions or as TSSs, if the up and down coordinates are NULL or are numbers.

Arguments

Usage

The ANY,data.frame method: blocksStats{ANY,data.frame}(x, anno, ...) The ANY,GRanges method: blocksStats{ANY,GRanges}(x, anno, up = NULL, down = NULL, ...)

Details

For array data, the statstics are either determined by a t-test, or a linear model. For sequencing data, the two groups are assumed to be from a negative binomial distribution, and an exact test is used.

Value

A data.frame, with the same number of rows as there are features described by anno, but with additional columns for the statistics calculated at each feature.

See Also

annotationLookup and annotationBlocksLookup

Examples

Run this code
require(GenomicRanges)
  intensities <- matrix(c(6.8, 6.5, 6.7, 6.7, 6.9,
                          8.8, 9.0, 9.1, 8.0, 8.9), ncol = 2)
  colnames(intensities) <- c("Normal", "Cancer")
  d.matrix <- matrix(c(-1, 1))
  colnames(d.matrix) <- "Cancer-Normal"
  probe.anno <- data.frame(chr = rep("chr1", 5),
                           position = c(4000, 5100, 6000, 7000, 8000), 
                           index = 1:5)
  anno <- GRanges("chr1", IRanges(7500, 10000), '+', name = "Gene 1")
  blocksStats(intensities, anno, 2500, 2500, probe.anno, log2.adj = FALSE, design = d.matrix)

Run the code above in your browser using DataLab