makeTmodFromDataFrame | R Documentation |
Convert a data frame to a tmod object
makeTmodFromDataFrame(
df,
feature_col = 1,
module_col = 2,
title_col = NULL,
extra_module_cols = NULL,
extra_gene_cols = NULL
)
df |
A data frame |
feature_col |
Which column contains the feature (gene) IDs |
module_col |
Which column contains the module (gene set) IDs |
title_col |
Description of the modules (if NULL, the description will be taken from the module_col) |
extra_module_cols |
Additional columns to include in the module data frame |
extra_gene_cols |
Additional gene columns to include in the genes data frame |
'makeTmodFromFeatureDataFrame' converts mapping information from features (genes) to modules (gene sets). The data frame has a row for each feature-module pair.
'makeTmodFromModuleDataFrame' converts mapping information from features (genes) to modules (gene sets). The data frame has a row for each module, and all gene IDs corresponding to a module are stored as a comma separated string, e.g.
Vice versa, 'tmod2DataFrame' converts a tmod object to a data frame.
A tmod object
makeTmodGS
, makeTmodGS
df <- data.frame(
gene_id=LETTERS[1:10],
geneset_id=rep(letters[1:2], each=5),
geneset_description=rep(paste0("Gene set ", letters[1:2]), each=5))
res <- makeTmodFromDataFrame(df,
feature_col="gene_id",
module_col="geneset_id",
title_col="geneset_description")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.