genesList: genesList

View source: R/genesList.R

genesListR Documentation

genesList

Description

Produces a list of nested dataframes. The list will depend on the type of analysis that is to be conducted. For combined analysis method = "c", and for separated analysis method = "s".

In combined analysis colnames should be 'timepoint.resulttype'. genesList will make new dataframes separated at 'timepoint.'.

In separated analysis colnames should be 'genetype_timepoint.resulttype'. genesList will make separate lists for each 'genetype_', and these lists will have dataframes which have been made by separating at 'timepoint.'.

Make sure to follow colname nomenclature carefully. Please refer to the vignette for more details on the nomenclature.

Usage

genesList(MAE, method, genetic_data, timeString, miR_data, mRNA_data)

Arguments

MAE

MultiAssayExperiment which will store the output from genesList. It is recommended to use the MAE which stores output from combineGenes (combined analysis) or addPrefix (separated analysis).

method

Either "c" or "s", respectively for combined or separated analysis.

genetic_data

If "c", this should be a dataframe with miR and mRNA information together. This is the output from the combineGenes function and will be stored as an assay within the MAE used in the combineGenes function.

timeString

If "c", this should be a common string representing 'timepoints' e.g. for H.1, H.10, H.20, timeString = "H".

miR_data

If "s", a dataframe of microRNA data. Rownames are genes and colnames are: genetype_timepoint.resulttype. Column names should be the same in mRNA and miR data. miR_data is from the addPrefix function, and will be stored as an assay within the MAE used in addPrefix.

mRNA_data

If "s", a dataframe of mRNA data. Rownames are genes and colnames are: genetype_timepoint.resulttype. Column names should be the same in mRNA and miR data. mRNA_data is from the addPrefix function, and will be stored as an assay within the MAE used in addPrefix.

Value

A list of dataframes separated by features in the column names. Output will be stored as metadata in the input MAE.

Examples

miR <- mm_miR[1:50,]

mRNA <- mm_mRNA[1:100,]

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

# For separated analysis

MAE <- addPrefix(MAE = MAE, gene_df = assay(MAE, 1),
                 prefixString = "miR")

MAE <- addPrefix(MAE = MAE, gene_df = assay(MAE, 2),
                 prefixString = "mRNA")

MAE <- genesList(MAE, method = "s", miR_data = assay(MAE, 3),
                 mRNA_data = assay(MAE, 4))

# For combined analysis

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

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

Krutik6/TimiRGeN documentation built on Jan. 27, 2024, 7:46 p.m.