# load relevant packages
# library(STRINGdb)
# library(ggnetwork)
# library(ggplot2)
# library(igraph)
# library(dplyr)
# library(glue)
# load all package functions
devtools::load_all()
# read differential expression data (annotated with gene symbols)
de_string <- readRDS('data/de_string_v11.RDS')
# select MYC condition as an example
myc_de <- de_string$MYC
# define globals
deg <- myc_de
edge_conf_score_min <- 950
logFC_min <- 1.5
pvalue_max <- 0.05
causal_gene_symbol <- 'MYC'
method <- 'betweenness'
final_results <- c()
export_network <- FALSE
n_sim <- 9999
sim_method <- 'jaccard'
weighted <- TRUE
# network generation ------------------------------------------------------
# generate protein association network
string_db <- STRINGdb::STRINGdb$new(version="11",
species=9606,
score_threshold=edge_conf_score_min)
ppi <- string_db$get_graph()
# map DEA results onto ppi network
ppi_painted <- df_to_vert_attr(graph=ppi, df=deg, common="STRING_id",
attr_name = c("Symbol", "ID", "logFC", "AveExpr",
"t", "P.Value", "adj.P.Val", "B"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.