Skip to contents

Create a permutation difference network This function requires export_permutation_results() to have been run for the specific permutation analysis of interest, with the filter_significant parameter set to FALSE, so that users can set their own p-value threshold for filtering out edges.

Usage

create_perm_diff_network(
  e,
  permutation_group,
  channel = "cfos",
  p_value_thresh = 0.001,
  ontology = "allen",
  anatomical.order = c("Isocortex", "OLF", "HPF", "CTXsp", "CNU", "TH", "HY", "MB", "HB",
    "CB"),
  community_detection_function = tidygraph::group_fast_greedy,
  ...
)

Arguments

e

experiment object

permutation_group

(str) Supply names of the specific analyses found under e$permutation_p_matrix %>% names()

channel

(str, default = "cfos")

p_value_thresh

(numeric, default = 0.001) User chosen p-value for thresholding edges to include in the network.

ontology

(str, default = "allen") Set to "unified" for Kim Lab unified ontology

anatomical.order

(vec, default = c("Isocortex","OLF","HPF","CTXsp","CNU","TH","HY","MB","HB","CB")) The default super region acronym list that groups all subregions in the dataset.

community_detection_function

(function, default = tidygraph::group_fast_greedy) tidygraph grouping function supporting various algorithms for community detection

...

Additional arguments for the community_detection_function chosen

Value

e experiment object

Examples

if (FALSE) {
e <- create_perm_diff_network(e, permutation_group = "Control_vs_Isoflurane", channel = "cfos", ontology = "unified", p_value_thresh = 0.001, weights = NULL)
}