View source: R/mod_understand_utils.R
convertToEntrezid | R Documentation |
To convert features to entrezid to enrich.
convertToEntrezid(featList, fromDbList, organismDb)
featList |
Feature lists from each omic data block. |
fromDbList |
Database names vector. One by omic block (e.g. for 2 omics list(omic1 = "SYMBOL", omic2 = "ENSEMBL")). Returned by getDbFromInput() for app. |
organismDb |
Organism database to convert features. |
featConverted
if (requireNamespace("org.Mm.eg.db", quietly = TRUE)) { library(org.Mm.eg.db, warn.conflicts = FALSE) data("omic2", package = "multiSight") splitData <- splitDatatoTrainTest(omic2, 0.8) data.train <- splitData$data.train data.test <- splitData$data.test diabloRes <- runSPLSDA(data.train) diabloModels <- diabloRes$model #sPLS-DA model using all omics. diabloFeats <- diabloRes$biosignature #selected features for each omic. id_db <- list(omic1 = "ENSEMBL", omic2 = "ENSEMBL") convFeat <- convertToEntrezid(diabloFeats, id_db, "org.Mm.eg.db") featList <- list(Omic1 = c("ENSMUSG00000039621", "ENSMUSG00000038733", "ENSMUSG00000062031"), Omic2 = c("ENSMUSG00000031170", "ENSMUSG00000077495", "ENSMUSG00000042992")) dbList <- list(Omic1 = "ENSEMBL", Omic2 = "ENSEMBL") convFeat <- convertToEntrezid(featList, dbList, "org.Mm.eg.db") }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.