View source: R/CrossExpression.R
smooth_cells | R Documentation |
Smooths cells' gene expression by averaging its expression by the nearest neighbors. Optionally computes genes by genes Pearson's correlation matrix between cells by genes and neighbors by genes matrices.
smooth_cells(data, locations, neighbors_smoothed = 1, corr = TRUE)
data |
A cells by genes expression matrix. |
locations |
A cells by coordinates (x-y or higher dimensions) matrix. |
neighbors_smoothed |
Numbers of neighbors used for smoothing (0 is the cell itself; 1 is the nearest neighbor). |
corr |
If TRUE, computes genes by genes correlation matrix between regions. |
Returns a smoothed gene expression matrix. If corr = TRUE, additionally returns a gene-gene correlation matrix.
data("locations")
data("expression")
locations = as.matrix(locations)
expression = as.matrix(expression)
expression = expression[,1:5]
results = smooth_cells(data = expression, locations = locations)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.