extractDA | R Documentation |
Inspect the list of p-values or/and log fold changes from the output of differential abundance detection methods.
extractDA( object, slot = "pValMat", colName = "adjP", type = "pvalue", direction = NULL, threshold_pvalue = 1, threshold_logfc = 0, top = NULL, verbose = FALSE )
object |
Output of differential abundance detection methods.
|
slot |
A character vector with 1 or number-of-methods-times repeats of
the slot names where to extract values for each method
(default |
colName |
A character vector with 1 or number-of-methods-times repeats
of the column name of the slot where to extract values for each method
(default |
type |
A character vector with 1 or number-of-methods-times repeats
of the value type of the column selected where to extract values for each
method. Two values are possible: |
direction |
A character vector with 1 or number-of-methods-times repeats
of the |
threshold_pvalue |
A single or a numeric vector of thresholds for
p-values. If present, features with p-values lower than
|
threshold_logfc |
A single or a numeric vector of thresholds for log
fold changes. If present, features with log fold change absolute values
higher than |
top |
If not null, the |
verbose |
Boolean to display the kind of extracted values
(default |
A data.frame
with several columns for each method:
stat
which contains the p-values or the absolute log fold
change values;
direction
which is present if direction
was
supplied, it contains the information about directionality of
differential abundance (usually log fold changes);
DA
which can contain several values according to
thresholds and inputs. "DA"
or "non-DA"
if
direction = NULL
, "UP Abundant"
, "DOWN Abundant"
, or
"non-DA"
otherwise.
getDA
, extractStatistics
data("ps_plaque_16S") # Add scaling factors my_norm <- setNormalizations(fun = c("norm_edgeR", "norm_CSS"), method = c("TMM", "CSS")) ps_plaque_16S <- runNormalizations(normalization_list = my_norm, object = ps_plaque_16S) # Perform DA analysis my_methods <- set_limma(design = ~ 1 + HMP_BODY_SUBSITE, coef = 2, norm = c("TMM", "CSS")) Plaque_16S_DA <- runDA(method_list = my_methods, object = ps_plaque_16S) # Top 10 features (ordered by 'direction') are DA DA_1 <- extractDA( object = Plaque_16S_DA, slot = "pValMat", colName = "adjP", type = "pvalue", direction = "logFC", threshold_pvalue = 1, threshold_logfc = 0, top = 10 ) # Features with p-value < 0.05 and |logFC| > 1 are DA DA_2 <- extractDA( object = Plaque_16S_DA, slot = "pValMat", colName = "adjP", type = "pvalue", direction = "logFC", threshold_pvalue = 0.05, threshold_logfc = 1, top = NULL )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.