distanceFromTSS-methods: Returns the GRanges annotated with info about the closer TSS

Description Methods Examples

Description

For each GRanges region it decorates the GRanges with extra columns containing info about the closer TSS.

Methods

To be used in this form:

distanceFromTSS(Object, txdb, EG2GS=NULL)

where:

The method returns a GRanges with additional columns. If EG2GS is NULL three columns are appended containing info for the gene with the closer TSS:

If EG2GS is provided, gene symbols are also included as additional column.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
require(TxDb.Mmusculus.UCSC.mm9.knownGene)
txdb <- TxDb.Mmusculus.UCSC.mm9.knownGene
isActiveSeq(txdb) <- c(TRUE, rep(FALSE, length(isActiveSeq(txdb))-1))
TSSpos <- TSS(txdb)
gr <- TSSpos[1:5]
start(gr) <- start(gr)-1000
end(gr) <- end(gr)-600
mcols(gr) <- NULL
distanceFromTSS(Object=gr, txdb=txdb, EG2GS=NULL)
restoreSeqlevels(txdb)

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