Annotate the link set with txDb. Give a gene list, and return a
Source:R/annotate.R
annotatePromoter-linkSet-method.Rd
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
)
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 = TRUE))
#> Loading required package: TxDb.Hsapiens.UCSC.hg38.knownGene
#> Loading required package: GenomicFeatures
#> Loading required package: AnnotationDbi
#>
#> creating 'src_organism' database...