Wrapper around kde() function from the ks package to calculate the density of a brain area across samples. It saves each sample separately in a specified folder.

calculate_density(cells_df, n_slice = 10)

Arguments

cells_df

dataframe with xyz coordinates ("xPos", "yPos", "zPos") of the brain area of interest. Each row corresponds to a different cell that belongs to a sample ("sample_id")

n_slice

integer which specifies in how many parts to slice the estimate. Default = 10.

Value

Examples