Skip to contents

Method for excluding user specified regions, layer 1, and contralateral hemisphere per slice. This function automatically excludes the default regions included in the attribute "regions_excluded" in each slice IN ADDITION to the regions added to the 'exclude_regions' parameter. Regions added to the 'exclude_regions' parameter will then be updated in the slice attribute to keep track of what was excluded. Note: Please see the simplify_regions and simplify_keywords parameters. By default, if a subregion can be folded into a parent region based on a certain keywords, then this function will automatically exclude the entire parent region as a conservative exclusion approach. Keep simplify_regions=TRUE if the final analysis will contain simplified regions.

Method for excluding cell counts in specified regions, layer 1, out-of-bounds cells counts, and hemispheres per mouse. This function automatically excludes the default regions included in the attribute "regions_excluded" in each slice IN ADDITION to the regions added to the 'exclude_regions' parameter. Regions added to the 'exclude_regions' parameter will then be updated in the slice attribute to keep track of what was excluded.

Note: Please see the simplify_regions and simplify_keywords parameters. By default, if a subregion can be folded into a parent region based on a certain keywords, then this function will automatically exclude the entire parent region as a conservative exclusion approach. Keep simplify_regions=TRUE if the final analysis will contain simplified regions.

Usage

exclude_anatomy(x, ...)

# S3 method for slice
exclude_anatomy(
  s,
  channels = NULL,
  clean = TRUE,
  exclude_right_regions = NULL,
  exclude_left_regions = NULL,
  exclude_hemisphere = TRUE,
  exclude_layer_1 = TRUE,
  include_right_regions = NULL,
  include_left_regions = NULL,
  simplify_regions = TRUE,
  simplify_keywords = c("layer", "part", "stratum", "division", "leaflet",
    "Subgeniculate", "island", "Islands", "Fields of Forel", "Cajal", "Darkschewitsch",
    "Precommissural"),
  plot_filtered = TRUE
)

# S3 method for mouse
exclude_anatomy(
  m,
  slice_ID = NA,
  hemisphere = NULL,
  channels = NULL,
  clean = TRUE,
  exclude_right_regions = NULL,
  exclude_left_regions = NULL,
  exclude_hemisphere = FALSE,
  exclude_layer_1 = TRUE,
  include_right_regions = NULL,
  include_left_regions = NULL,
  simplify_regions = TRUE,
  simplify_keywords = c("layer", "part", "stratum", "division", "leaflet",
    "Subgeniculate", "island", "Islands", "Fields of Forel", "Cajal", "Darkschewitsch",
    "Precommissural"),
  plot_filtered = TRUE
)

Arguments

...
s

slice object

channels

(str vector, default = NULL) Channels to process. If NULL, defaults to the channels stored in the slice object attributes.

clean

(bool, default = TRUE ). Remove cells that don't map to any regions.

exclude_right_regions

(str vector, default = NULL); acronyms of regions you want to exclude from right hemi,in addition to regions that will by default be excluded in the slice attribute 'right_regions_excluded'

exclude_left_regions

(str vector, default = NULL); acronyms of regions you want to exclude from left hemi, in addition to regions that will by default be excluded in the slice attribute 'left_regions_excluded'

exclude_hemisphere

(bool, default = TRUE); excludes the contralateral hemisphere from one indicated in slice attribute

exclude_layer_1

(bool, default = TRUE); excludes all counts from layer 1 (TEMPORARY, may not be hardcoded in later)

include_right_regions

(str vector, default = NULL) Acronyms of regions to include from the right hemi; if not NULL, takes precedence over exclude_right_regions & all other regions will be excluded. Typically, this is used for slices with poor quality/lots of tears.

include_left_regions

(str vector, default = NULL) Acronyms of regions to include from the light hemi; if not NULL, takes precedence over exclude_left_regions & all other regions will be excluded. Typically, this is used for slices with poor quality/lots of tears.

simplify_regions

(bool, default = TRUE ) simplify the normalized region counts based on keywords in the internal function, simplify_keywords

simplify_keywords

(str vec, default = c("layer","part","stratum","division")). Keywords to search through region names and simplify to parent structure. This means the parent structure is also excluded if the list of excluded right and left regions can be further

plot_filtered
m

mouse object

slice_ID

(str) ID of slice

hemisphere

(str) 'left', 'right' or NULL (both)

Value

m mouse object

Examples