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,
  ...
)

Arguments

active_snw_path

path to the output of an Active Subnetwork Search

genes_df

the input data that was used with run_pathfindR. It must be a data frame with 3 columns:

  1. Gene Symbol (Gene Symbol)

  2. Change value, e.g. log(fold change) (optional)

  3. 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

pin_name_path

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')

num_snws

number of top subnetworks to be visualized (leave blank if you want to visualize all subnetworks)

layout

The type of layout to create (see ggraph for details. Default = 'stress')

score_quan_thr

active subnetwork score quantile threshold. Must be between 0 and 1 or set to -1 for not filtering. (Default = 0.8)

sig_gene_thr

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

Value

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

Examples

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