scmapCluster: scmap main function

Description Usage Arguments Value Examples

Description

Projection of one dataset to another

Usage

1
2
3
4
5
6
7
scmapCluster(projection = NULL, index_list = NULL, threshold = 0.7)

scmapCluster.SingleCellExperiment(projection, index_list, threshold)

## S4 method for signature 'SingleCellExperiment'
scmapCluster(projection = NULL,
  index_list = NULL, threshold = 0.7)

Arguments

projection

'SingleCellExperiment' object to project

index_list

list of index objects each coming from the output of 'indexCluster'

threshold

threshold on similarity (or probability for SVM and RF)

Value

The projection object of SingleCellExperiment class with labels calculated by 'scmap' and stored in the scmap_labels column of the rowData(object) slot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)
isSpike(sce, 'ERCC') <- grepl('^ERCC-', rownames(sce))
# remove features with duplicated names
sce <- sce[!duplicated(rownames(sce)), ]
sce <- selectFeatures(sce)
sce <- indexCluster(sce)
sce <- scmapCluster(sce, list(metadata(sce)$scmap_cluster_index))

hemberg-lab/scmap documentation built on April 25, 2018, 2:50 a.m.