Description Usage Arguments Value Examples
For each cell in a query dataset, we search for the nearest neighbours by cosine distance within a collection of reference datasets.
1 2 3 4 5 6 7 |
projection |
an object of |
index_list |
list of index objects each coming from the output of 'indexCell' |
w |
a positive integer specifying the number of nearest neighbours to find |
a list of 3 objects: 1) a matrix with the closest w neighbours by cell number of each query cell stored by column 2) a matrix of integers giving the reference datasets from which the above cells came from 3) a matrix with the cosine similarities corresponding to each of the nearest neighbours
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(SingleCellExperiment)
sce <- SingleCellExperiment(assays = list(normcounts = as.matrix(yan)), colData = ann)
# this is needed to calculate dropout rate for feature selection
# important: normcounts have the same zeros as raw counts (fpkm)
counts(sce) <- normcounts(sce)
logcounts(sce) <- log2(normcounts(sce) + 1)
# use gene names as feature symbols
rowData(sce)$feature_symbol <- rownames(sce)
# remove features with duplicated names
sce <- sce[!duplicated(rownames(sce)), ]
sce <- selectFeatures(sce)
sce <- indexCell(sce)
scmapCell_results <- scmapCell(sce, list(metadata(sce)$scmap_cell_index))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.