View source: R/imputeEmbedding.R
| imputeEmbedding | R Documentation |
Performs naive imputation of values from the list of mosaic data and joint embedding from StabMap.
imputeEmbedding( assay_list, embedding, reference = Reduce(union, lapply(assay_list, colnames)), query = Reduce(union, lapply(assay_list, colnames)), neighbours = 5, fun = mean )
assay_list |
List of mosaic data from which to perform imputation. |
embedding |
Joint embedding from which to extract nearest neighbour relationships. |
reference |
Character vector of cell names to treat as reference cells. |
query |
Character vector of cell names to treat as query cells. |
neighbours |
Number of nearest neighbours to consider (default 5). |
fun |
function (default ‘mean') to aggregate nearest neighbours’ imputed values. |
List containing imputed values from each assay_list data matrix which contains reference cells.
set.seed(2021)
assay_list = mockMosaicData()
lapply(assay_list, dim)
# stabMap
out = stabMap(assay_list,
ncomponentsReference = 20,
ncomponentsSubset = 20)
# impute values
imp = imputeEmbedding(assay_list, out)
# inspect the imputed values
lapply(imp, dim)
imp[[1]][1:5,1:5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.