Learn R Programming

RaceID (version 0.1.3)

compdist: Computing a distance matrix for cell type inference

Description

This functions computes the distance matrix used for cell type inference by RaceID3.

Usage

compdist(object, metric = "pearson", FSelect = TRUE, knn = NULL)

Arguments

object

SCseq class object.

metric

Distances are computed from the filtered expression matrix after optional feature selection, dimensional reduction, and/or transformation (batch correction). Possible values for metric are "pearson", "spearman", "logpearson", "euclidean". Default is "pearson". In case of the correlation based methods, the distance is computed as 1 <U+2013> correlation.

FSelect

Logical parameter. If TRUE, then feature selection is performed prior to RaceID3 analysis. Default is TRUE.

knn

Positive integer number of nearest neighbours used for imputing gene expression values. Default is NULL and no imputing is done.

Value

SCseq object with the distance matrix in slot distances. If FSelect=TRUE, the genes used for computing the distance object are stored in slot cluster$features.

Examples

Run this code
# NOT RUN {
sc <- SCseq(intestinalDataSmall)
sc <- filterdata(sc)
sc <- compdist(sc)
# }

Run the code above in your browser using DataLab