| GeneTonic_list {GeneTonic} | R Documentation |
Create a list for GeneTonic from the single required components.
GeneTonic_list(dds, res_de, res_enrich, annotation_obj)
dds |
A |
res_de |
A |
res_enrich |
A
|
annotation_obj |
A |
Having this dedicated function saves the pain of remembering which names the components of the list should have.
A GeneTonic-list object, containing in its named slots the arguments
specified above: dds, res_de, res_enrich, and annotation_obj - the names
of the list are specified following the requirements for using it as single
input to GeneTonic()
Federico Marini
library("macrophage")
library("DESeq2")
library("org.Hs.eg.db")
library("AnnotationDbi")
# dds object
data("gse", package = "macrophage")
dds_macrophage <- DESeqDataSet(gse, design = ~ line + condition)
rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15)
dds_macrophage <- estimateSizeFactors(dds_macrophage)
# annotation object
anno_df <- data.frame(
gene_id = rownames(dds_macrophage),
gene_name = mapIds(org.Hs.eg.db,
keys = rownames(dds_macrophage),
column = "SYMBOL",
keytype = "ENSEMBL"
),
stringsAsFactors = FALSE,
row.names = rownames(dds_macrophage)
)
# res object
data(res_de_macrophage, package = "GeneTonic")
res_de <- res_macrophage_IFNg_vs_naive
# res_enrich object
data(res_enrich_macrophage, package = "GeneTonic")
res_enrich <- shake_topGOtableResult(topgoDE_macrophage_IFNg_vs_naive)
res_enrich <- get_aggrscores(res_enrich, res_de, anno_df)
gtl_macrophage <- GeneTonic_list(
dds = dds_macrophage,
res_de = res_de,
res_enrich = res_enrich,
annotation_obj = anno_df
)
# now everything is in place to launch the app
if (interactive()) {
GeneTonic(gtl = gtl_macrophage)
}