getTES: Extract the TES (=end of the gene/transcript) from a...

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/utils.R

Description

Extract the TES (=end of the gene/transcript) from a GRanges or GRangesList

Usage

1
getTES(gr)

Arguments

gr

Either a GRanges or a GRangesList object.

Details

The TES is defined as start(gr) when strand(gr)=="+" and as end(gr) when strand(gr)=="-" The function considers that strand=="*" is equivalent to strand=="+"

Value

A GRanges or GRangesList of the TES positions

Author(s)

Pascal GP Martin

See Also

getTESregion

Examples

1
2
3
4
5
6
7
8
## Get the TSS of genes in GeneGR:
  GenomicRanges::promoters(Genegr, upstream = 0, downstream = 1)
## Get their TES:
  getTES(Genegr)
## The function also works on GRangesList:
mygrglist <- S4Vectors::split(Genegr,
                              rep(paste0("gene", 1:169), each = 4))
getTES(mygrglist)

pgpmartin/GeneNeighborhood documentation built on Sept. 2, 2021, 6:37 a.m.