SCimplify_from_embedding | R Documentation |
This function detects metacells (former super-cells) from single-cell gene expression matrix
SCimplify_from_embedding(
X,
cell.annotation = NULL,
cell.split.condition = NULL,
gamma = 10,
k.knn = 5,
n.pc = 10,
do.approx = FALSE,
approx.N = 20000,
block.size = 10000,
seed = 12345,
igraph.clustering = c("walktrap", "louvain"),
return.singlecell.NW = TRUE,
return.hierarchical.structure = TRUE,
...
)
X |
low dimensional embedding matrix with rows to be cells and cols to be low-dim components |
cell.annotation |
a vector of cell type annotation, if provided, metacells that contain single cells of different cell type annotation will be split in multiple pure metacell (may result in slightly larger numbe of metacells than expected with a given gamma) |
cell.split.condition |
a vector of cell conditions that must not be mixed in one metacell. If provided, metacells will be split in condition-pure metacell (may result in significantly(!) larger number of metacells than expected) |
gamma |
graining level of data (proportion of number of single cells in the initial dataset to the number of metacells in the final dataset) |
k.knn |
parameter to compute single-cell kNN network |
n.pc |
number of principal components to use for construction of single-cell kNN network |
do.approx |
compute approximate kNN in case of a large dataset (>50'000) |
approx.N |
number of cells to subsample for an approximate approach |
block.size |
number of cells to map to the nearest metacell at the time (for approx coarse-graining) |
seed |
seed to use to subsample cells for an approximate approach |
igraph.clustering |
clustering method to identify metacells (available methods "walktrap" (default) and "louvain" (not recommended, gamma is ignored)). |
return.singlecell.NW |
whether return single-cell network (which consists of approx.N if |
return.hierarchical.structure |
whether return hierarchical structure of metacell |
... |
other parameters of build_knn_graph function |
a list with components
graph.supercells - igraph object of a simplified network (number of nodes corresponds to number of metacells)
membership - assigmnent of each single cell to a particular metacell
graph.singlecells - igraph object (kNN network) of single-cell data
supercell_size - size of metacells (former super-cells)
gamma - requested graining level
N.SC - number of obtained metacells
genes.use - used genes (NA due to low-dim representation)
do.approx - whether approximate coarse-graining was perfirmed
n.pc - number of principal components used for metacells construction
k.knn - number of neighbors to build single-cell graph
sc.cell.annotation. - single-cell cell type annotation (if provided)
sc.cell.split.condition. - single-cell split condition (if provided)
SC.cell.annotation. - super-cell cell type annotation (if was provided for single cells)
SC.cell.split.condition. - super-cell split condition (if was provided for single cells)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.