plot_string | R Documentation |
To be used in conjunction with map_string
plot_string(
map,
layout = "fr",
edge_min = 0,
edge_max = Inf,
enriched_only = FALSE,
enrichment = NULL,
overlap = 2,
fdr_cutoff = 0.2,
colors = NULL,
text_size = 2,
node_size = 1
)
map |
List output by map_string |
layout |
Character string for network layout algorithm. See options in igraph::layout_with_ |
edge_min |
Numeric minimum edges a node must have to be displayed. Default is 0 meaning orphan nodes are included |
edge_max |
Numeric maximum edges a node must have to be displayed. Default in Inf. Set to 0 to see only orphan nodes |
enriched_only |
Logical if should include only genes in significantly enriched terms. Default FALSE |
enrichment |
Data frame output by |
overlap |
Numeric minimum of total significant genes in a enrichment term to be used as colors ( |
fdr_cutoff |
Numeric maximum FDR of enrichment terms to be used as colors ( |
colors |
Character vector of custom colors to use. Must be at least a long as total significant terms plus 1 for the "none" group |
text_size |
Numeric size of gene labels on network nodes. Default of 2 |
node_size |
Numeric size of network nodes. Default of 1 |
ggplot STRING network object
#NOT RUN
# map <- map_string(genes = c("MTHFD2","ISOC1","IL2RB","SAMHD1","NAMPT","NOD1",
# "NFKB1","IFIT3","ZBP1","IL15RA","SP110","ITGB7",
# "SERPING1","B2M","CXCL11","USP18","MAPKAPK2","DKK1"),
# version = 12, score_threshold = 400)
# plot_string(map)
#
# Add enrichment colors
# library(dplyr)
# library(SEARchways)
# genes.OI <- example.model$lmerel %>%
# filter(variable == "virus" & FDR < 0.2) %>%
# select(variable, gene)
# example_enrich <- SEARchways::BIGprofiler(gene_df = genes.OI,
# category = "H", ID = "ENSEMBL")
#
# map2 <- map_string(genes = genes.OI$gene,
# version = 11.5, score_threshold = 400)
# plot_string(map2, enrichment = example_enrich, fdr_cutoff=0.2)
# plot_string(map2, enrichment = example_enrich, fdr_cutoff=0.2, enriched_only=TRUE)
#
# Add GSEA colors
# genes.FC <- example.model$lmerel %>%
# filter(variable == "virus") %>%
# select(variable, gene, estimate)
# example_gsea <- BIGsea(gene_df = genes.FC, category = "H", ID = "ENSEMBL")
#
# plot_string(map2, enrichment = example_gsea, fdr_cutoff = 0.3,
# edge_max = 0, enriched_only=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.