find.discriminant.genes | R Documentation |
Based on 'FindMarkers'. It performs differential expression analysis between a projected query and a control (either the reference map or a control sample), for a given cell type. Useful to detect whether specific cell states over/under-express genes between conditions or with respect to the reference.
find.discriminant.genes(
ref,
query,
query.control = NULL,
ref.assay = "RNA",
query.assay = "RNA",
state = "largest",
labels.col = "functional.cluster",
test = "wilcox",
min.cells = 10,
genes.use = c("variable", "all"),
...
)
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 |
ref.assay |
The referece assay to be used for DE analysis |
query.assay |
The query assay to be used for DEG analyis, if comparing to the reference |
state |
Perform discriminant analysis on this cell state. Can be either:
|
labels.col |
The metadata field used to annotate the clusters (default: functional.cluster) |
test |
Type of test for DE analysis. See help for 'FindMarkers' for implemented tests. |
min.cells |
Minimum number of cells in the cell type to proceed with analysis. |
genes.use |
What subset of genes to consider for DE analysis:
|
... |
Adding parameters for 'FindMarkers' |
A dataframe with a ranked list of genes as rows, and statistics as columns (e.g. log fold-change, p-values). See help for 'FindMarkers' for more details.
# Discriminant genes between query and reference in cell type "Tex"
markers <- find.discriminant.genes(ref, query=query.set, state="Tex")
# Discriminant genes between query and control sample in most represented cell type
markers <- find.discriminant.genes(ref, query=query.set, query.control=control.set)
# Pass results to EnhancedVolcano for visual results
library(EnhancedVolcano)
EnhancedVolcano(markers, lab = rownames(markers), x = 'avg_logFC', y = 'p_val')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.