Add.DE.combined.score | R Documentation |
Add a combined score to differential expression (DE) results. The score is calculated as log-fold change (LFC) times negative logarithm of scaled p-value (LFC * -log10( p_cutoff / pval_scaling )).
Add.DE.combined.score(
df = df.markers,
p_val_min = 1e-25,
pval_scaling = 0.001,
colP = "p_val",
colLFC = CodeAndRoll2::grepv(pattern = c("avg_logFC|avg_log2FC"), x = colnames(df),
perl = TRUE)
)
df |
A data frame that holds the result of a differential gene expression analysis, typically obtained via the 'FindAllMarkers' function. Default: df.markers. |
p_val_min |
The minimum p-value considered. All values below this threshold are set to this value. Default: 1e-25. |
pval_scaling |
The value to scale p-values by in the calculation of the combined score. Default: 0.001. |
colP |
The name of the column in the input data frame that holds p-values. Default: 'p_val'. |
colLFC |
The name of the column in the input data frame that holds log-fold change values. By default, it selects the first column not named "avg_logFC" or "avg_log2FC". |
## Not run:
if (interactive()) {
df.markers <- Add.DE.combined.score(df.markers)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.