Skip to contents

This analysis will get regional cross correlations based on cell counts normalized by region volume.

Usage

get_correlations(
  e,
  by,
  values,
  channels = c("cfos", "eyfp", "colabel"),
  p_adjust_method = "none",
  alpha = 0.05,
  ontology = "allen",
  anatomical.order = c("Isocortex", "OLF", "HPF", "CTXsp", "CNU", "TH", "HY", "MB",
    "HB", "CB"),
  region_order = NULL
)

Arguments

e

experiment object

by

(str) Attribute names to group by, e.g. c("sex", "group")

values

(str) The respective values of the attributes entered for the by parameter to generate a specific analysis group, e.g.values = c("female", "AD").

channels

(str, channels = c("cfos", "eyfp", "colabel") The channels to process.

p_adjust_method

(bool or str, default = "none") This parameter is fed into the p.adjust function. Options: c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none") Apply the named method to control for the inflated false discovery rate or family wise error rate (FWER). Set to FALSE or "none" to keep "raw" p values. See also stats::p.adjust() for the correction options.

alpha

(num, default = 0.05) The alpha level for significance applied AFTER p-adjustment.

ontology

(str, default = "allen") Region ontology to use. options = "allen" or "unified"

anatomical.order

(vec, c("Isocortex","OLF","HPF","CTXsp","CNU","TH","HY","MB","HB","CB")) The default super region acronym list that sorts all subregions in the dataset for grouped positioning in the correlation matrix. Supercedes region_order parameter.

region_order

(list, default = NULL) optional list with the first element named "acronym" supplying a vector as region acronyms and the second element named "order" supplying an vector of integers determining numerical order, e.g. 1, 1, 2, 2.

Value

e experiment object. The experiment object now has a named correlation_list object stored in it. The name of the correlation object is the concatenation of the variable values separated by a "_". This name allows for unambiguous identification of different analysis subgroups in the future.

See also

Examples

e <- get_correlations(e, by = c("sex", "group"), values = c("female", "AD"),
channels = c("cfos", "eyfp", "colabel"),  p_adjust_method = "BH", alpha = 0.05)
#> Error in dplyr::filter(., !!var == values[k]): object 'e' not found