View source: R/planewisecounts.R
cell.counts.plane | R Documentation |
Processes .CSV files output by the "cell outline" batch macro in the ImageJ custom macros plugin (Timothy and Forlano, 2019).
"Cell counts" data refers to a tally of rows, each denoting an above-threshold cell marked by a particular wavelength.
Can only be used to analyze one wavelength per analysis. This R function identifies two groups, produces graphs, and runs an unpaired-samples T-Test.
It is generally recommended that images are taken and analyzed from multiple coronal planes of brain tissue. This particular function differentiates between the anterior, middle, and posterior planes and analyzes them separately, using 'patchwork' to display three barplots and vectorizing the P-values from the T-Tests as the anterior comparison P-Value, middle comparison P-Value, and posterior comparison P-Value, respectively.
All parameters must be in quotations, besides "n_per_group." The .CSV files to be analyzed must be placed in your working directory.
When imaging your tissue initially, it is critical that the output filenames are saved in the following format: GroupName_ExperimentName_SubjectNumber_MagnificationX_CoronalPlane_SideOfTissue_RegionOfTissue
To mitigate experimenter bias (throughout all stages of the experimental process, but including this one) it is recommended that the group names are codified in a way agnostic to experimental treatment.
Note that this documentation does not allow loading of an example dataset, so the example below does not display properly. See the intro slideshow, or the "R Basics" article, for a working example.
cell.counts.plane( graph_name_1, graph_name_2, graph_name_3, DV, first_group, second_group, n_per_group, data = x )
graph_name_1 |
The title of the output barplot for the analysis of your "anterior" sections. |
graph_name_2 |
The title of the output barplot for the analysis of your "middle" sections. |
graph_name_3 |
The title of the output barplot for the analysis of your "posterior" sections. |
DV |
The dependent variable used for the analysis. Should denote the cell type, tissue type or region, and/or wavelength analyzed. |
first_group |
How one of your groups is codified. Note: When imaging tissue for processing, this string must be put at the beginning of the saved filenames. |
second_group |
How the other group is codified. Note: "first_group" and "second_group" must be alphabetized in the respective order of your codified group names. |
n_per_group |
How many subjects are included in each group. Used to compute standard error of the mean for error bars on barplot. |
x |
The name of your .CSV file. |
A three-item vector containing the P-Values for unpaired-samples T-Tests between groups at each level of the second factor (plane of tissue), as well as three side-by-side plots corresponding to each comparison.
Timothy, M., & Forlano, P. M. (2019). A versatile macro-based neurohistological image analysis suite for ImageJ focused on automated and standardized user interaction and reproducible data output. Journal of neuroscience methods, 324, 108286. https://doi.org/10.1016/j.jneumeth.2019.04.009
immuno.analyze::cell.counts.plane("VTA_Counts", "med", "pos", "Cell_Counts", "Ctrl", "Switch", 6, data = "outline_VTA.csv")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.