Skip to contents

Annotate the link set with txDb. Give a gene list, and return a

Usage

# S4 method for class 'linkSet'
annotatePromoter(
  x,
  genome = "hg38",
  keyType = "symbol",
  upstream = 5000,
  overwrite = FALSE
)

Arguments

x

linkSet

genome

the genome you want to annotate

keyType

the key type. You can check with AnnotationDbi::keytypes

upstream

The upstream base from the gene

overwrite

Whether to overwrite the regionsBait if it already exists

Value

linkSet object

Examples

  gr1 <- GRanges(seqnames = c("chr1", "chr2", "chr3"),
                ranges = IRanges(start = c(1000, 2000, 3000), width = 100),
                strand = "+", symbol = c("BRCA1", "TP53", "NONEXISTENT"))
  gr2 <- GRanges(seqnames = c("chr1", "chr2", "chr3"),
                ranges = IRanges(start = c(5000, 6000, 7000), width = 100),
                strand = "+")
  ls <- linkSet(gr1, gr2, specificCol = "symbol")

  # Test annotatePromoter
  annotated_ls <- suppressWarnings(annotatePromoter(ls, genome = "hg38", upstream = 500,overwrite = T))