find.discriminant.dimensions: Find discriminant dimensions

View source: R/main.R

find.discriminant.dimensionsR Documentation

Find discriminant dimensions

Description

Searches PCA or ICA dimensions where the query set deviates the most from a control set or from the reference map. It can be useful to suggest novel cell states that escape from the main axes of diversity of the UMAP

Usage

find.discriminant.dimensions(
  ref,
  query,
  query.control = NULL,
  query.assay = "RNA",
  state = "largest",
  labels.col = "functional.cluster",
  reduction = "ICA",
  test = c("ks", "t.test"),
  ndim = 50,
  print.n = 3,
  verbose = T
)

Arguments

ref

Seurat object with reference atlas

query

Seurat object with query data

query.control

Optionally, you can compare your query with a control sample, instead of the reference

query.assay

The data slot to be used for enrichment analysis

state

Perform discriminant analysis on this cell state. Can be either:

  • "largest" - Performs analysis on the cell state most represented in the query set(s)

  • "all" - Performs analysis on the complete dataset, using all cells

  • A specific cell state, one of the states in metadata field labels.col

labels.col

The metadata field used to annotate the clusters (default: functional.cluster)

reduction

Which dimensionality reduction to use (either ICA or PCA)

test

Which test to perform between the dataset distributions in each ICA/PCA dimension. One of 'ks' (Kolmogorov-Smirnov) or 't.test' (T-test)

ndim

How many dimensions to consider in the reduced ICA/PCA space

print.n

The number of top dimensions to return to STDOUT

verbose

Print results to STDOUT

Value

A dataframe, where rows are ICA/PCA dimensions. ICA/PCAs are ranked by statistical significance when comparing their distribution between query and control (or query vs. reference map)

Examples

find.discriminant.dimensions(ref, query=query.set)
find.discriminant.dimensions(ref, query=query.set, query.control=control.set)

carmonalab/ProjecTILs documentation built on April 13, 2025, 10:04 p.m.