Visualize Active Subnetworks
visualize_active_subnetworks(
active_snw_path,
genes_df,
pin_name_path = "Biogrid",
num_snws,
layout = "stress",
score_quan_thr = 0.8,
sig_gene_thr = 0.02,
...
)
path to the output of an Active Subnetwork Search
the input data that was used with run_pathfindR
.
It must be a data frame with 3 columns:
Gene Symbol (Gene Symbol)
Change value, e.g. log(fold change) (optional)
p value, e.g. adjusted p value associated with differential expression
The change values in this data frame are used to color the affected genes
Name of the chosen PIN or absolute/path/to/PIN.sif. If PIN name, must be one of c('Biogrid', 'STRING', 'GeneMania', 'IntAct', 'KEGG', 'mmu_STRING'). If path/to/PIN.sif, the file must comply with the PIN specifications. (Default = 'Biogrid')
number of top subnetworks to be visualized (leave blank if you want to visualize all subnetworks)
The type of layout to create (see ggraph
for details. Default = 'stress')
active subnetwork score quantile threshold. Must be between 0 and 1 or set to -1 for not filtering. (Default = 0.8)
threshold for the minimum proportion of significant genes in the subnetwork (Default = 0.02) If the number of genes to use as threshold is calculated to be < 2 (e.g. 50 signif. genes x 0.01 = 0.5), the threshold number is set to 2
additional arguments for input_processing
a list of ggplot objects of graph visualizations of identified active subnetworks. Green nodes are down-regulated genes, reds are up-regulated genes and yellows are non-input genes
path2snw_list <- system.file(
'extdata/resultActiveSubnetworkSearch.txt',
package = 'pathfindR'
)
# visualize top 2 active subnetworks
g_list <- visualize_active_subnetworks(
active_snw_path = path2snw_list,
genes_df = example_pathfindR_input[1:10, ],
pin_name_path = 'KEGG',
num_snws = 2
)
#> ## Processing input. Converting gene symbols,
#> if necessary (and if human gene symbols provided)
#> Number of genes provided in input: 10
#> Number of genes in input after p-value filtering: 10
#> Could not find any interactions for 5 (50%) genes in the PIN
#> Final number of genes in input: 5