GetCellGeneRanking: Ranking Extraction

View source: R/cell.R

GetCellGeneRankingR Documentation

Ranking Extraction

Description

Intermediate function for ranking extraction from Cell Gene Distance Matrix. Genes are ordered from the most specific to the least specific to the cell according to their euclidean distances. Value indicates the euclidean distances between the cell and the genes in the MCA coordinates.

Usage

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

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

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

Arguments

X

Seurat or SingleCellExperiment 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 features available from specified reduction Embedding.

Value

A cell named list of gene rankings ordererd by distances from shortest (most specific) to farthest (less specific)

Examples

seuratPbmc <- RunMCA(seuratPbmc, nmcs = 5)
ranking <- GetCellGeneRanking(seuratPbmc, reduction = "mca", dims = 1:5)

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