Description Usage Arguments Details Value Examples
View source: R/make_gs_network.R
Form a tidygraph from a list of gene-sets
1 | make_gs_network(gene_sets, top_table, .by = c(label = "gene_name"))
|
gene_sets |
A list of gene-sets as described in the details section |
top_table |
An optional topTable as output by a function such as limma::topTable(), or edgeR::topTags()$table |
.by |
If providing the topTable, this will be passed to dplyr::left_join() |
Taking a list of gene-sets as the primary input form a network. Names of each list element are assumed to be the names of gene-sets, with the values within each element assumed to be gene identifiers. Choosing actual gene names may be the most useful option. All genes provided will be plotted, so removing uninteresting genes may be helpful before passing to this function
If provided, the topTable will be joined onto the nodes allowing all columns to be used for modifying the final plot. The most useful columns may be either logFC or the PValue.
By default, all nodes (i.e. gene-sets and gene names) will be contained in a column named 'label'. Setting the correct column from the topTable to join on can be performed using the .by argument.
It should also be noted that these networks become very cumbersome, very quickly and as such, supplying a relatively small number (e.g. 10) of nodes (i.e. gene-sets) may be the most viable approach
A tbl_graph
1 2 3 4 5 6 7 8 | set.seed(100)
geneSets <- list(
a = as.character(1:3), b = as.character(3:5), c = as.character((1:3)*2)
)
topTable <- tibble(
gene_name = as.character(1:6), PValue = runif(6), logFC = runif(6, -3, 3)
)
tg <- make_gs_network(gene_sets = geneSets, top_table = topTable)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.