Internally used in plot_ancombc_pq()
.
Arguments
- ancombc_res
(required) the result of the ancombc_pq function For the moment only bimodal factors are possible.
- filter_passed
(logical, default TRUE) Do we filter using the column passed_ss? The passed_ss value is TRUE if the taxon passed the sensitivity analysis, i.e., adding different pseudo-counts to 0s would not change the results.
- filter_diff
(logical, default TRUE) Do we filter using the column diff? The diff value is TRUE if the taxon is significant (has q less than alpha)
- min_abs_lfc
(integer, default0) Minimum absolute value to filter results based on Log Fold Change. For ex. a value of 1 filter out taxa for which the abundance in a given level of the modality is not at least the double of the abundance in the other level.
Value
A data.frame with the same number of columns than the ancombc_res
param but with less (or equal) numbers of rows
Details
This function is mainly a wrapper of the work of others.
Please make a reference to ANCOMBC::ancombc2()
if you
use this function.
Examples
# \donttest{
if (requireNamespace("mia")) {
data_fungi_mini@tax_table <- phyloseq::tax_table(cbind(
data_fungi_mini@tax_table,
"taxon" = taxa_names(data_fungi_mini)
))
res_time <- ancombc_pq(
data_fungi_mini,
fact = "Time",
levels_fact = c("0", "15"),
tax_level = "taxon",
verbose = TRUE
)
signif_ancombc(res_time)
}
#> Warning: The group variable has < 3 categories
#> The multi-group comparisons (global/pairwise/dunnet/trend) will be deactivated
#> Warning: The number of taxa used for estimating sample-specific biases is: 9
#> A large number of taxa (>50) is required for the consistent estimation of biases
#> Obtaining initial estimates ...
#> Estimating sample-specific biases ...
#> Warning: Estimation of sampling fractions failed for the following samples:
#> BT-006-M_S55_MERGED.fastq.gz, C21-NV1-B_S62_MERGED.fastq.gz, CB8-019-H_S70_MERGED.fastq.gz, DY5-004-B_S96_MERGED.fastq.gz, DY5-004-H_S97_MERGED.fastq.gz, J18-004-M_S116_MERGED.fastq.gz, W26-001-B_S165_MERGED.fastq.gz, X24-009-B_S170_MERGED.fastq.gz
#> These samples may have an excessive number of zero values
#> Sensitivity analysis for pseudo-count addition to 0s: ...
#> ANCOM-BC2 primary results ...
#> [1] taxon lfc_(Intercept) lfc_Time15
#> [4] se_(Intercept) se_Time15 W_(Intercept)
#> [7] W_Time15 p_(Intercept) p_Time15
#> [10] q_(Intercept) q_Time15 diff_(Intercept)
#> [13] diff_Time15 passed_ss_(Intercept) passed_ss_Time15
#> <0 rows> (or 0-length row.names)
# }