基因本体论数据库—R包GO.db

GO.db: A set of annotation maps describing the entire Gene Ontology assembled using data from GO.

library(GO.db)

class(GO.db) 
# [1] "GODb"
# attr(,"package")
# [1] "AnnotationDbi"

# ls and objects return a vector of character strings 
# giving the names of the objects in the specified environment.
ls("package:GO.db")
objects("package:GO.db")

keytypes(GO.db)  # 基因编号系统名称
columns(GO.db)
#columns shows which kinds of data can be returned for the AnnotationDb object.

#keytypes allows the user to discover which keytypes can be passed in to select or keys and the keytype argument.

keys(GO.db)

keys(GO.db,keytype="TERM")

k <- keys(GO.db, keytype = "GOID")[1:3]

AnnotationDbi::select(GO.db,
       keys = k,
       columns = c("DEFINITION","TERM","ONTOLOGY"),
       keytype="GOID")

AnnotationDbi::select(GO.db, keys=keys(GO.db), columns="TERM") 

AnnotationDbi::select(GO.db, keys=keys(GO.db), columns=c(c("SYMBOL","REFSEQ")),
       keytype="GOID")

##Convert the object to a list
# GO生物过程(BP)术语与其祖先BP术语之间的关联。
x1 <- as.list(GOBPANCESTOR)
# Remove GO IDs that do not have any ancestor
x1 <- x1[!is.na(x1)]

length(x2)
# This data set gives mappings between GO identifiers and their respective terms.
x2 <- as.list(GOTERM)

参考https://www.bioconductor.org/packages/release/data/annotation/manuals/GO.db/man/GO.db.pdf

你可能感兴趣的:(r语言,生物信息学)