getDeaResultsDf.Rd
Extracts differential expression
analysis results. Function getDeaGenes()
is a wrapper around
getDeaResultsDf()
and returns only gene names in a character vector.
getDeaGenes(
object,
across = getDefaultGrouping(object),
across_subset = NULL,
method_de = "wilcox",
max_adj_pval = NULL,
min_lfc = 0,
n_highest_lfc = NULL,
n_lowest_pval = NULL,
flatten = TRUE,
assay_name = activeAssay(object),
...
)
getDeaResultsDf(
object,
across = getDefaultGrouping(object),
across_subset = NULL,
relevel = FALSE,
method_de = "wilcox",
max_adj_pval = NULL,
min_lfc = NULL,
n_highest_lfc = NULL,
n_lowest_pval = NULL,
stop_if_null = TRUE,
assay_name = activeAssay(object),
...
)
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Character value or NULL. Specifies the grouping variable of interest.
Use getGroupingOptions()
to obtain all variable names that group the
barcode spots of your object in a certain manner.
Character vector or NULL. Specifies the particular groups
of interest the grouping variable specified in argument across
contains.
If set to NULL all of them are chosen. You can prefix groups you are NOT interested in with a '-'. (Saves writing if there are more groups you are interested in than groups you are not interested in.)
Use getGroupNames()
to obtain all valid input options.
Character value. Denotes the method to according to which the de-analysis is performed.
Given to argument test.use
of the Seurat::FindAllMarkers()
-function. Run SPATA::dea_methods
to obtain all valid input options.
Numeric value. Sets the threshold for adjusted p-values. All genes with adjusted p-values above that threshold are ignored.
Numeric value. Sets the threshold for average log fold change. All genes with an average log fold change below that threshold are ignored.
Numeric value. Affects the total number of genes that are kept. See details.
Numeric value. Affects the total number of genes that are kept. See details.
Only relevant if the SPATA2
object contains more than
one assay: Denotes the assay of interest and thus the
molecular modality to use. Defaults to the active assay
as set by activateAssay()
.
Used to absorb deprecated arguments or functions.
Logical value. If set to TRUE the input order of across_subset
determines the order in which the groups of interest are displayed. Groups that
are not included are dropped which affects the colors with which they are displayed.
A data.frame:
gene Character. The differentially expressed genes.
'across' Character. The grouping across which the analysis was performed. The variable/column name is
equal to the input for argument across
.
avg_logFC Numeric. The average log-fold change to which the belonging gene was differentially expressed..
p_val Numeric. The p-values.
p_val_adj Numeric. The adjusted p-values.
The de-data.frame is processed such that the following steps are performed for every experimental group.
Discards genes with avg_logFC-values that are either infinite or negative
Discards genes with adjusted p-values above the threshold set with max_adj_pval
Discard genes with average log fold change below the treshold set with min_lfc
Slices the data.frame in order that for every experimental group:
the n genes with the highest avg_logFC-values are kept where n = n_highest_lfc
the n genes with the lowest p_val_adj-values are kept where n = n_lowest_pval
Arranges the genes according to the highest avg_logFC-values