Learn R Programming

Repitools (version 1.18.0)

annotationLookup: Forms a mapping between probes on a tiling array and windows surrounding the TSSs of genes.

Description

Starting from genome locations for probes and a locations for a set of genes, this procedure forms a list structure that contains the indices to map from one to the other.

Arguments

Usage

The data.frame,data.frame method: annotationLookup(x, anno, ...) The data.frame,GRanges method: annotationLookup(x, anno, up, down, ...)

Details

This function is a wrapper for the generic function annotationBlocksLookup which can handle annotations of varying sizes. annotationLookup is appropriate where you wish to map probes that are within a fixed distance of points of annotation e.g gene transcription start sites. Even if strand information is given for probes, it is ignored.

If x has no index column, then the probes are given indices from 1 to the number of probes, in the order that they appear in the data.frame or GRanges object.

It is an error for the gene annotation to have unstranded features.

See Also

annotationBlocksLookup, makeWindowLookupTable

Examples

Run this code
# create example set of probes and gene start sites
probes <- data.frame(position=seq(1000, 3000, by = 200), chr = "chrX", strand = '-')
genes <- data.frame(chr = "chrX", start=c(2100, 1000), end = c(3000, 2200),
                    strand=c("+","-"))
rownames(genes) <- paste("gene", 1:2, sep = '')

# Call annotationLookup() and look at output
annotationLookup(probes, genes, 500, 500)

Run the code above in your browser using DataLab