calculate_markers_shiny | R Documentation |
Performs the Wilcoxon rank sum test to identify differentially expressed genes between two groups of cells in the shiny context. The method can be also used outside the shiny context, as long as the expression matrix is stored in a h5 file.
calculate_markers_shiny(
cells1,
cells2,
logfc_threshold = 0,
min_pct_threshold = 0.1,
average_expression_threshold = 0,
average_expression_group1_threshold = 0,
min_diff_pct_threshold = -Inf,
used_slot = "data",
norm_method = "SCT",
expression_h5_path = "expression.h5",
pseudocount_use = 1,
base = 2,
verbose = TRUE,
check_difference = TRUE
)
cells1 |
A vector of cell indices for the first group of cells. |
cells2 |
A vector of cell indices for the second group of cells. |
logfc_threshold |
The minimum absolute log fold change to consider a
gene as differentially expressed. Defaults to |
min_pct_threshold |
The minimum fraction of cells expressing a gene
form each cell population to consider the gene as differentially expressed.
Increasing the value will speed up the function. Defaults to |
average_expression_threshold |
The minimum average expression that a gene should have in order to be considered as differentially expressed. |
average_expression_group1_threshold |
The minimum average expression
that a gene should have in the first group of cells to be considered as
differentially expressed. Defaults to |
min_diff_pct_threshold |
The minimum difference in the fraction of cells
expressing a gene between the two cell populations to consider the gene as
differentially expressed. Defaults to |
used_slot |
Parameter that provides additional information about the
expression matrix, whether it was scaled or not. The value of this parameter
impacts the calculation of the fold change. If |
norm_method |
The normalization method used to normalize the expression
matrix. The value of this parameter impacts the calculation of the average
expression of the genes when |
expression_h5_path |
The path to the h5 file containing the expression
matrix. The h5 file should contain the following fields: |
pseudocount_use |
The pseudocount to add to the expression values when
calculating the average expression of the genes, to avoid the 0 value for
the denominator. Defaults to |
base |
The base of the logharithm. Defaults to |
verbose |
Whether to print messages about the progress of the function. Defaults to TRUE. |
check_difference |
Whether to perform set difference between the two cells. Defaults to TRUE. |
A data frame containing the following columns:
gene
: The gene name.
avg_log2FC
: The average log fold change between the two cell groups.
p_val
: The p-value of the Wilcoxon rank sum test.
p_val_adj
: The adjusted p-value of the Wilcoxon rank sum test.
pct.1
: The fraction of cells expressing the gene in the first cell group.
pct.2
: The fraction of cells expressing the gene in the second cell group.
avg_expr_group1
: The average expression of the gene in the first cell group.
avg_expr
: The average expression of the gene.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.