cellToClusterMapping_byRank: Cell-based cluster mapping

View source: R/markerGenesAndMapping.r

cellToClusterMapping_byRankR Documentation

Cell-based cluster mapping

Description

Maps cells to clusters by correlating every mapped cell with every reference cell, ranking the cells by correlation, and the reporting the cluster with the lowest average rank.

Usage

cellToClusterMapping_byRank(
  mapDat,
  refDat,
  clustersF,
  genesToMap = rownames(mapDat),
  mergeFunction = rowMedians,
  useRank = TRUE,
  use = "p",
  method = "p"
)

Arguments

mapDat

normalized data of the MAPPING data set.

refDat

normalized data of the REFERENCE data set

clustersF

factor indicating which cluster each cell type is actually assigned to in the reference data set

genesToMap

character vector of which genes to include in the correlation mapping

mergeFunction

function for combining ranks; the tested choices are rowMeans or rowMedians (default)

useRank

use the rank of the correlation (default) or the correlation itself to determine the top cluster

use

additional parameter for cor (use='p' as default)

method

additional parameter for cor (method='p' as default)

Value

a two column data matrix where the first column is the mapped cluster and the second column is a confidence call indicating how close to the top of the ranked list cells of the assigned cluster were located relative to their best possible location in the ranked list. This confidence score seems to be a bit more reliable than correlation at determining how likely a cell in a training set is to being correctly assigned to the training cluster.


AllenInstitute/mfishtools documentation built on July 5, 2023, 4:20 p.m.