Skip to contents

All functions

add_mouse()
Add mouse object to an experiment
add_slice()
Add slice to a mouse object m <- add_slice(m, s, replace = FALSE)
adjust_brain_outline()
Adjust brain outline.
attr2match
attr2match
check_redundant_parents()
Check for redundant parent regions included in a list of acronyms in a plate. For example, if all the the subregions for the hypothalamus are represented, the HY should not be included in the list.
combine_cell_counts()
Combine cell counts across all mice in an experiment into a single dataframe.
correlation_diff_permutation()
This function performs a permutation analysis to compare the region pairwise correlation coefficients between two different analysis groups.
create_joined_networks()
Create a joined network to visualize overlapping connections with the same outer joined node set.
create_networks()
Create %>% graph objects for plotting different analysis subgroups.
detect_single_slice_regions()
Detect atlas regions that only show up in a single slice object within a mouse.
enough_mice_per_group()
Check if there are enough mice per analysis subgroup across all regions. if the normalized counts data sets are split by specified grouping variables. This function also automatically keeps only the common regions that are found across all comparison groups.
exclude_anatomy()
exclude_anatomy (generic function)
experiment()
Create an experiment object
export_permutation_results()
Export the permutation results as a csv file. This automatically saves into the tables folder.
filter
Premade.
find_all_subregions()
find_all_subregions
find_outlier_counts()
Detect, log, and remove outlier counts. This function removes any normalized regions counts that are more than n_sd standard deviations (default = 2) higher than their cohort mean.
find_segmentation_files()
Find segmentation files following the naming conventions of the denny lab given a channel name and a root slice directory
get.acronym.child.custom()
Get acronyms of child structures
get.acronym.child()
Get acronyms of child structures
get.acronym.parent.custom()
Get parent region acronyms
get.acronym.parent()
Get parent region acronyms
get.colabeled.cells()
Get colabelled cells data table. This is designed specifically to create a segmentation object from the imported raw files that are outputs from the batch_3D_MultiColocalization.ijm macro.
get.registered.areas.bu()
Get the registered areas
get.registered.areas.td()
Get top down registered areas
get.sub.structure.custom()
Get subregion acronyms
get.sub.structure()
Get subregion acronyms
get.sup.structure.custom()
Get super parent region acronyms
get.sup.structure()
Get parent region acronyms
get.super.regions()
Updated function to return character vector of the super region acronyms after inputting a character vector of acronyms
get_cell_table()
Get cell tables
get_common_regions()
Get common regions that are found across all the comparison groups.
get_correlations()
Get regional cross correlations and their p-values in a correlation list object.
get_percent_colabel()
Get the percentage of colabelled cells over either cfos or eyfp channels.
get_registered_volumes(<mouse>)
Method for getting regional areas and volumes for each slice in a mouse object
get_registered_volumes()
get_registered_volumes (generic function)
id.from.acronym.custom()
Get region ontology ID from acronym
import_segmentation_custom()
import_segmentation (generic function)
import_segmentation_ij()
import_segmentation (generic function)
make.filter
#' Modification of Marcos' combine regions function #' #' @param normalized_counts list with length = No. channels., each channel element is df of normalized counts #' @param keywords a vector of keywords with which to simplify the region names #' #' @return a list with length = No. channels. Each channel df has simplified parent acronyms and names is summed from original df based on them. #' #' @examples simplify.regions <- function(normalized_counts, keywords = c("layer","part","stratum","division")) make.filter( data, params = c("Vol..unit.", "Moment1", "Moment2", "Moment3", "Moment4", "Sigma"), ranges = list(c(200, 12000), c(3, 50), c(0, 600), c(0, 2000), c(0, 5), c(20, Inf)) ) #' Modification of Marcos' combine regions function #' #' @param normalized_counts list with length = No. channels., each channel element is df of normalized counts #' @param keywords a vector of keywords with which to simplify the region names #' #' @return a list with length = No. channels. Each channel df has simplified parent acronyms and names is summed from original df based on them. #' #' @examples simplify.regions <- function(normalized_counts, keywords = c("layer","part","stratum","division")) Initialize empty list vector to store the simplified counts simplified_counts <- vector(mode = "list", length = length(normalized_counts)) names(simplified_counts) <- names(normalized_counts)
make_segmentation_filter()
make_segmentation_filter (generic function)
make_segmentation_object()
make_segmentation_object (generic funciton)
map_cells_to_atlas()
map_cells_to_atlas (generic function)
mouse()
Create a mouse object
name.from.acronym.custom()
Get region ontology name from acronym
name.from.acronym()
Get region ontology name from acronym
name.from.id.custom()
Get region ontology name from ID
name.from.id()
Get region ontology name from ID
normalize_cell_counts()
Normalize cell counts per mm^2^ or by mm^3^ (if multiplying by the stack size).
normalize_colabel_counts()
Normalize colabel counts over a designated denominator channel.
ontology
Ontology
ontology.unified
Unified Kim ontology
parallel_coordinate_plot()
Create a parallel coordinate plot
parentid.from.id.custom()
Get parent id from id
permute_corr_diff_distrib()
Generate array of null distribution of region pairwise correlation differences.
plot_betweenness_regions()
Plot the betweenness distributions across regions
plot_cell_counts()
This function allows for plotting of normalized cell counts by area across specific regions to plot. Two different mouse attributes can be used as categorical variables to map to either the color or pattern aesthetics of the bar plot, e.g. sex and experimental group. The color aesthetic takes precedence over the pattern aesthetic so if you only want to use one mouse attribute, for plotting set it to the color_mapping parameter and set the pattern_mapping parameter to NULL.
plot_correlation_heatmaps()
Plot correlation heatmaps
plot_degree_distributions()
Plot the degree distributions
plot_degree_regions()
Plot the degree distributions across regions
plot_joined_networks()
Plot the networks stored in an experiment object
plot_mean_between_centrality()
Plot mean betweenness centrality
plot_mean_clust_coeff()
Plot mean clustering coefficient
plot_mean_degree()
Plot the mean degree of the networks in a barplot. Error bars are plotted as SEM.
plot_mean_global_effic()
Plot mean global efficiency
plot_networks()
Plot the networks stored in an experiment object
plot_normalized_counts()
Plot normalized cell counts
plot_percent_colabel()
This function allows for plotting of colabelled cells over either the "cfos" or "eyfp" channels. And allows for specification of specific brain regions to plot. Two different mouse attributes can be used as categorical variables to map to either the color or pattern aesthetics of the bar plot, e.g. sex and experimental group. The color aesthetic takes precedence over the pattern aesthetic so if you only want to use one mouse attribute, for plotting set it to the color_mapping parameter and set the pattern_mapping parameter to NULL.
print(<correlation_list>)
Print attributes of correlation_list object
print(<experiment>)
Print attributes of experiment object
print(<mouse>)
Print attributes of mouse object
print(<slice>)
Print attributes of slice object
register()
Register (generic function)
reset_mouse_root()
Reset the root path for the folder containing the registration and segmentation data.
rois_intersect_region_list()
Get a list of intersecting regions to a list of common regions
save_experiment()
Save experiment data
save_mouse()
Save mouse data
segmentation.object
segmentation object compatible with wholebrain package functions
sem()
Standard error function
simplify_by_keywords()
Simplify dataframe by keywords.
simplify_cell_count()
Simplify the combined cell count table
simplify_vec_by_keywords()
Simplify vector of acronyms by keywords.
slice()
Create a slice object
SMARTR
SMARTR: A mapping, analysis, and visualization package for wholebrain dual-ensemble coronal datasets.
summarise_networks()
Summarize multiple networks. Create summary dataframes of for multiple networks and calculate network statistics for each network.
try_correlate()
Try to correlate
volcano_plot()
Plot the results of the permutation histogram used to determine the p-value of the pairwise region comparison