convertToEntrezid: Understand utils function

View source: R/mod_understand_utils.R

convertToEntrezidR Documentation

Understand utils function

Description

To convert features to entrezid to enrich.

Usage

convertToEntrezid(featList, fromDbList, organismDb)

Arguments

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.

Value

featConverted

Examples



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")
}



Fjeanneret/multiSight documentation built on April 6, 2022, 7:59 a.m.