% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{find.discriminant.dimensions}
\alias{find.discriminant.dimensions}
\title{Find discriminant dimensions}
\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{
\item{ref}{Seurat object with reference atlas}

\item{query}{Seurat object with query data}

\item{query.control}{Optionally, you can compare your query with a control sample, instead of the reference}

\item{query.assay}{The data slot to be used for enrichment analysis}

\item{state}{Perform discriminant analysis on this cell state. Can be either:
\itemize{
  \item{"largest" - Performs analysis on the cell state most represented in the query set(s)}
  \item{"all" - Performs analysis on the complete dataset, using all cells}
  \item{A specific cell state, one of the states in metadata field labels.col}
}}

\item{labels.col}{The metadata field used to annotate the clusters (default: functional.cluster)}

\item{reduction}{Which dimensionality reduction to use (either ICA or PCA)}

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

\item{ndim}{How many dimensions to consider in the reduced ICA/PCA space}

\item{print.n}{The number of top dimensions to return to STDOUT}

\item{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)
}
\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
}
\examples{
find.discriminant.dimensions(ref, query=query.set)
find.discriminant.dimensions(ref, query=query.set, query.control=control.set)
}
