| getDA {benchdamic} | R Documentation |
Inspect the list of p-values or/and log fold changes from the output of a differential abundance detection method.
getDA( method, slot = "pValMat", colName = "rawP", type = "pvalue", direction = NULL, threshold_pvalue = 1, threshold_logfc = 0, top = NULL, verbose = FALSE )
method |
Output of a differential abundance detection method.
|
slot |
The slot name where to extract values
(default |
colName |
The column name of the slot where to extract values
(default |
type |
The value type of the column selected where to extract values.
Two values are possible: |
direction |
|
threshold_pvalue |
Threshold value for p-values. If present, features
with p-values lower than |
threshold_logfc |
Threshold value 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:
stat which contains the p-values or the absolute log fold
change values;
direction which is present if method was a
data.frame object, 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 method
object was a vector, "UP Abundant", "DOWN Abundant", or
"non-DA" if method was a data.frame.
data("ps_plaque_16S")
# Add scaling factors
ps_plaque_16S <- norm_edgeR(object = ps_plaque_16S, method = "TMM")
# DA analysis
da.limma <- DA_limma(
object = ps_plaque_16S,
design = ~ 1 + HMP_BODY_SUBSITE,
coef = 2,
norm = "TMM"
)
# features with p-value < 0.1 as DA
getDA(
method = da.limma, slot = "pValMat", colName = "rawP", type = "pvalue",
direction = NULL, threshold_pvalue = 0.1, threshold_logfc = 0,
top = NULL
)
# top 10 feature with highest logFC are DA
getDA(
method = da.limma, slot = "pValMat", colName = "rawP", type = "pvalue",
direction = "logFC", threshold_pvalue = 1, threshold_logfc = 0, top = 10
)
# features with p-value < 0.1 and |logFC| > 1 are DA
getDA(
method = da.limma, slot = "pValMat", colName = "rawP", type = "pvalue",
direction = "logFC", threshold_pvalue = 0.1, threshold_logfc = 1, top =
NULL
)
# top 10 features with |logFC| > 1 are DA
getDA(
method = da.limma, slot = "pValMat", colName = "rawP", type = "pvalue",
direction = "logFC", threshold_pvalue = 1, threshold_logfc = 1, top = 10
)