View source: R/quantile_matrix.R
quantiles_matrix | R Documentation |
This function is used for get the neighborhood quantile matrix for the raw spatial omics dataset.
quantiles_matrix( data, coordinate, index, distance = NULL, NN = NULL, min_percentile = 0.1, max_percentile = 0.9, quantile_number = 21, method = pca_, ... )
data |
a data frame containing the expression information for each cell, like proteins, genes. |
coordinate |
the coordinates of the corresponding cells in the data argument. |
index |
the indices of the corresponding cells in the data argument. |
distance |
the maximal radius of the neighborbood from the center cell. |
NN |
the number of the nearest neighbors. The default value is NULL. |
min_percentile |
the minimal percentile. The default value is 0.1. |
max_percentile |
the maximal percentile. The default value is 0.9. |
quantile_number |
the number of quantiles for each variable. |
method |
the dimension reduction function for the data argument. |
... |
other parameters passed to the method argument. |
The spatial omics dataset could be divided into two parts, the expression matrix and the coordinates.
Firstly, the dimension reduction method like Principle Component Analysis will be applied to the expression matrix.
Then, the neighborhood for each cell will be extracted according to the distance between them.
Next, in each neighborhood, tens of quantiles of each principal component are calculated, which are treated as
neighborhood information vector for each cell.
The final output is a neighborhood quantile matrix, each row of which is the neighborhood quantile vector of
principal components for each cell.
a neighborhood quantile matrix. Each row represents quantiles of reduced features in the neighborhood of one cell.
The first is the number of cells in the corresponding neighborhood, which is used to check whether there are some abnormal neighborhoods.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.