Description Usage Arguments Examples
View source: R/summarize_to_region.R
Wrapper around dplyr functions to create a summary dataframe with information about count and intensity per brain area. In the output: count_perthousand refers to the number of cells expressing the protein of interest per thousand of total cells in that brain area, while intensity refers to the average intensity of active cells. You can also specify the type of cells estimated.
1 | summarize_per_region(xyz_coordinates, estimation_atlas, cells_type = "cells")
|
xyz_coordinates |
dataframe where each row is a cell. It contains the following variables: 'sample_id' to describe the sample; 'my_grouping' for the brain areas; 'maxInt' for the maximum intensity of the protein per identified cell. |
estimation_atlas |
estimation atlas already adjusted for the brain areas of interest. Can be output from adapt_estimation_atlas(). |
cells_type |
type of cells from estimation atlas to be used for count correction. Look at the variables of estimation_atlas for types. If not specified, uses all types. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | x <- data.frame(
sample_id = c(rep("a", 100), rep("b", 75), rep("c", 50)),
my_grouping = c(rep(c("CA1","CA2","CA3", "DG", "BLA"), each = 20),
rep(c("CA1", "CA2", "CA3"), each = 20), rep("BLA", 15), rep(c("DG", "BLA"), each = 25)),
maxInt = abs(rnorm(250, 100))
)
y <- data.frame(
my_grouping = c("CA1","CA2","CA3", "DG", "BLA"),
cells = sample(100000, 5),
glia = sample(10000, 5)
)
summarize_per_region(x,y)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.