#' GOenrich
#'
#'Analyse RNA-seq data
#' @param GENE_TO_ENRICH gene list generated by IDchange
#' @param CHANGEtoTYPE type of gene
#' @param SPECIES specie
#' @example
#' GOenrich(GENE_TO_ENRICH,SPECIES)
GOenrich<-function(x,SPECIES){
species_list<-c("HUMAN","MOUSE","RAT")
if (!SPECIES%in%species_list) {
ERRORinSPECIES<-paste("input should be one of",paste(species_list,collapse = ","))
stop('"SPECIES"', ERRORinSPECIES)
}
if (SPECIES=="HUMAN") {
library("org.Hs.eg.db")
OrgDb="org.Hs.eg.db"
}
if (SPECIES=="MOUSE") {
library("org.Mn.eg.db")
OrgDb="org.Mn.eg.db"
}
if (SPECIES=="RAT") {
library("org.Rn.eg.db")
OrgDb="org.Rn.eg.db"
}
library(clusterProfiler)
GO_readble<-clusterProfiler::enrichGO(x,
OrgDb = OrgDb,
keyType = 'ENTREZID',
ont = 'ALL',
pvalueCutoff = 0.05,#设定p值阈值
qvalueCutoff = 0.05,#设定q值阈值
readable = TRUE)
return(GO_readble)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.