addIds {TimiRGeN} | R Documentation

## addIds

### Description

Adds entrez or ensembl IDs to the nested dataframes within a list(c) or list of lists (s). The IDs are created by the getIdsMir and getIdsMrna functions, both are needed for addIds.

### Usage

    addIds(MAE, method, filtered_genelist, miR_IDs, mRNA_IDs)

### Arguments

`MAE` | MultiAssayExperiment to store the output of addIds. It is recommended to use the MAE which stores results from significantVals.
`method` | Either "c" or "s", respectively for combined or separated analysis.
`filtered_genelist` | A list of nested dataframes if 'c' or a list of lists with nested dataframes if 's'. This will be found as metadata within the MAE object used in the significantVals function.
`miR_IDs` | miR_ensembl or miR_entrez. Use a getIDsMir function to acquire this. This will be stored as an assay in the MAE used in a getIdsMir function.
`mRNA_IDs` | mRNA_ensembl or mRNA_entrez. Use a getIDsMrna function to acquire this. This will be stored as an assay in the MAE used in a getIdsMrna function.

### Value

List of dataframes with entrezIDs/ ensembl IDs and gene names as columns which will be stored as metadata in the input MAE.

### Examples

    library(org.Mm.eg.db)

    miR <- mm_miR[1:50,]

    mRNA <- mm_mRNA[1:100,]

    Data <- startObject(miR = mm_miR, mRNA = mm_mRNA)

    Data <- getIdsMir(Data, assay(Data, 1), orgDB = org.Mm.eg.db, 'mmu')

    Data <- getIdsMrna(Data, assay(Data, 2), mirror = 'useast',
                       species = 'mmusculus', orgDB = org.Mm.eg.db)

    Data <- combineGenes(MAE = Data, miR_data = assay(Data, 1),
                         mRNA_data = assay(Data, 2))

    Data <- genesList(MAE = Data, method = 'c', genetic_data = assay(Data, 9),
                      timeString = 'D')

    Data <- significantVals(MAE = Data, method = 'c',
                            geneList = metadata(Data)[[1]],
                            maxVal = 0.05, stringVal = "adjPVal")

    Data <- addIds(MAE = Data, method = "c",
                  filtered_genelist = metadata(Data)[[2]],
                  miR_IDs = assay(Data, 3), mRNA_IDs = assay(Data, 7))

[Package TimiRGeN version 1.4.0 Index]