Build up the title for the graph nodes to display the available information of each geneset.
getGraphTitle(geneset_df = NULL, node_ids, gs_ids, gs_names = NULL)
A data.frame
of genesets with a column Genesets
containing geneset identifiers and a column Genes
containing the genes belonging to each geneset
vector, a vector of ids of the nodes in the graph for which the node title should be build.
vector, a vector of geneset identifiers, e.g. the Genesets
column of geneset_df
.
vector, a vector of geneset descriptions/names, e.g. the
Term
/ Description
column of geneset_df
.
A list
of titles for a graph with nodes given by node_ids
.
genes <- list(
c("PDHB", "VARS2"), c("IARS2", "PDHA1"),
c("AAAS", "ABCE1"), c("ABI1", "AAR2"), c("AATF", "AMFR"),
c("BMS1", "DAP3"), c("AURKAIP1", "CHCHD1"), c("IARS2"),
c("AHI1", "ALMS1")
)
gs_names <- c("a", "b", "c", "d", "e", "f", "g", "h", "i")
geneset_df <- data.frame(
Genesets = gs_names,
value = rep(1, 9)
)
geneset_df$Genes <- genes
graph <- getGraphTitle(
geneset_df = geneset_df,
node_ids = c(1:9),
gs_ids = c(1:9),
gs_names = gs_names
)