scmapCluster {scmap} | R Documentation

## scmap main function

### Description

Projection of one dataset to another

### Usage

    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

    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 <- indexCluster(sce)
    sce <- scmapCluster(sce, list(metadata(sce)$scmap_cluster_index))

[Package scmap version 1.9.3 Index]