GetCellGeneDistance: Distance Calculation

View source: R/cell.R

GetCellGeneDistanceR Documentation

Distance Calculation

Description

Small intermediate function for euclidean distance calculation between MCA feature coordinates and cell coordinates. Due to MCA pseudo barycentric relationship, the closer a gene g is to a cell c, the more specific to such a cell it can be considered.

Usage

GetCellGeneDistance(X, reduction, dims, features, cells)

## S3 method for class 'Seurat'
GetCellGeneDistance(X, reduction = "mca", dims, features = NULL, cells = NULL)

## S3 method for class 'SingleCellExperiment'
GetCellGeneDistance(X, reduction = "MCA", dims, features = NULL, cells = NULL)

Arguments

X

Seurat or SingleCell Experiment Object

reduction

Which dimensionality reduction to use, must be based on MCA.

dims

A vector of integers indicating which dimensions to use with reduction embedding and loading for distance calculation.

features

Character vector of feature names to subset feature coordinates. If not specified will take all features available from specified reduction Loading.

cells

Character vector of cell names to subset cell coordinates. If not specified will take all cells available from specified reduction Embedding.

Value

Distance Matrix with genes at row and cells at column


RausellLab/CelliD documentation built on Jan. 12, 2024, 3:44 a.m.