find_symbol: find_symbol

Description Arguments See Also Examples

View source: R/gene_ids.R

Description

find gene symbol from annotation data

Arguments

id

a string for a gene id to match to gene symbol or aliases

annotation

a list of gene symbols named by ids such as those provided by bioconductor AnnotationDbi packages

n

number of symbols to list (maximum). Defaults to first. Set to Inf to display all.

See Also

find_symbol

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#load data to identify genes from IDs
if(!require("org.At.tair.db")){
  install.packages("BiocManager")
  BiocManager::install("org.At.tair.db")
  library("org.At.tair.db")
}
annotation <- as.list(org.At.tairSYMBOL)
id <- "AT3G11260"
find_symbol(id, annotation)

#
ids <- c("AT3G11260", "AT2G17950")
lapply(ids, find_symbol, annotation)

# show multiple gene symbols
lapply(ids, find_symbol, annotation, n = 2)
# show all gene symbols
lapply(ids, find_symbol, annotation, n = Inf)

TomKellyGenetics/tktools documentation built on Dec. 13, 2021, 10:06 p.m.