GRangesInPromoters-methods: Based on a GRanges and a TxDb, subsets the GRanges to those...

Description Methods Examples

Description

Subset a GRanges returning only those ranges which are overlapping (at least 1bp) with promoters

Methods

This method subsets a GRanges returning only those ranges which are overlapping, or not, with promoters defined based on a TxDb, upstream and downstream distance from TSS.

To be used in this form:

GRangesInPromoters(Object, txdb, upstream=2000, downstream=1000, invert=FALSE)

where:

Promoters are defined based on upstream and downstream distances from Transcription Start Sites (TSS). If invert if FALSE, the subset of Object overlapping with promoter regions is returned, if any, otherwise NULL is returned. If invert if TRUE, the subset of Object which is not overlapping with promoter regions is returned, if any, otherwise NULL is returned.

Examples

1
2
3
4
5
6
7
require(TxDb.Mmusculus.UCSC.mm9.knownGene)
txdb<- TxDb.Mmusculus.UCSC.mm9.knownGene
TSSpos <- TSS(txdb)
gr <- TSSpos[1:5]
start(gr) <- start(gr) - 1000
end(gr) <- end(gr) - 600
GRangesInPromoters(Object=gr, txdb=txdb, upstream=2000, downstream=1000)

compEpiTools documentation built on Nov. 8, 2020, 5:32 p.m.