Running ‘testthat.R’ [52s/64s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggpicrust2)
  Loading required package: ggpicrust2
  To cite ggpicrust2 in publications use:
  Chen Yang, Jiahao Mai, Xuan Cao, Aaron Burberry, Fabio Cominelli, Liangliang Zhang, ggpicrust2: an R package for PICRUSt2 predicted functional profile analysis and visualization, Bioinformatics, Volume 39, Issue 8, August 2023, btad470, https://doi.org/10.1093/bioinformatics/btad470
  > 
  > test_check("ggpicrust2")
  0  features are filtered!
  The filtered data has  12  samples and  20  features will be tested!
  Pseudo-count approach is used.
  Fit linear models ...
  Completed.
  0  features are filtered!
  The filtered data has  12  samples and  20  features will be tested!
  Pseudo-count approach is used.
  Fit linear models ...
  Completed.
  0  features are filtered!
  The filtered data has  6  samples and  15  features will be tested!
  Pseudo-count approach is used.
  Fit linear models ...
  Completed.
  Using column 'sample' as sample identifier
  1 constant pathway(s) have zero variance; treated as z-score 0 for clustering.
  The Sample Names in order from left to right are:
  S1, S2, S3, S4
  The Group Levels in order from left to right are:
  A, A, B, B
  Pathways ordered by hierarchical clustering (complete method, euclidean distance)
  Row order: Pathway2, Pathway1, Pathway3
  Reading input data...
  
  Annotating pathways...
  
  Creating pathway error bar plots...
  
  Plot 1 skipped (no data for method: mock_method)
  
  ggpicrust2 analysis completed.
  
  0  features are filtered!
  The filtered data has  8  samples and  15  features will be tested!
  Fit linear models ...
  Completed.
  Reading input data...
  
  Annotating pathways...
  
  Creating pathway error bar plots...
  
  Plot 1 skipped (no data for method: mock_method)
  
  ggpicrust2 analysis completed.
  
  0  features are filtered!
  The filtered data has  6  samples and  10  features will be tested!
  Fit linear models ...
  Completed.
  Note: Preranked GSEA methods (fgsea, clusterProfiler) do not account for inter-gene correlations, which may lead to unreliable p-values (Wu et al., 2012). Consider using method='camera' or method='fry' for more reliable statistical inference.
  Using column 'sample_name' as sample identifier
  Saving _problems/test-pathway_daa-32.R
  Saving _problems/test-pathway_daa-52.R
  Saving _problems/test-pathway_daa-86.R
  Saving _problems/test-pathway_daa-150.R
  Saving _problems/test-pathway_daa-188.R
  calcNormFactors has been renamed to normLibSizes
  Default value being used.
  Saving _problems/test-pathway_daa-419.R
  Saving _problems/test-pathway_daa-441.R
  calcNormFactors has been renamed to normLibSizes
  Saving _problems/test-pathway_daa-499.R
  Saving _problems/test-pathway_daa-523.R
  Saving _problems/test-pathway_daa-552.R
  Saving _problems/test-pathway_daa-577.R
  0  features are filtered!
  The filtered data has  12  samples and  12  features will be tested!
  Fit linear models ...
  Completed.
  0  features are filtered!
  The filtered data has  12  samples and  12  features will be tested!
  Fit linear models ...
  Completed.
  [1] "Creating output feature tables folder"
  [1] "Creating output fits folder"
  2026-05-02 13:53:03.366368 INFO::Writing function arguments to log file
  2026-05-02 13:53:03.381895 INFO::Verifying options selected are valid
  2026-05-02 13:53:03.383388 INFO::Determining format of input files
  2026-05-02 13:53:03.384461 INFO::Input format is data samples as rows and metadata samples as rows
  2026-05-02 13:53:03.387616 INFO::Formula for fixed effects: expr ~  Env
  2026-05-02 13:53:03.389215 INFO::Filter data based on min abundance and min prevalence
  2026-05-02 13:53:03.390351 INFO::Total samples in data: 12
  2026-05-02 13:53:03.391338 INFO::Min samples required with min abundance for a feature not to be filtered: 1.200000
  2026-05-02 13:53:03.39294 INFO::Total filtered features: 0
  2026-05-02 13:53:03.394042 INFO::Filtered feature names from abundance and prevalence filtering:
  2026-05-02 13:53:03.395754 INFO::Total filtered features with variance filtering: 0
  2026-05-02 13:53:03.396859 INFO::Filtered feature names from variance filtering:
  2026-05-02 13:53:03.397745 INFO::Running selected normalization method: TSS
  2026-05-02 13:53:03.39939 INFO::Applying z-score to standardize continuous metadata
  2026-05-02 13:53:03.403739 INFO::Running selected transform method: AST
  2026-05-02 13:53:03.405366 INFO::Running selected analysis method: LM
  2026-05-02 13:53:03.406473 INFO::Fitting model to feature number 1, f1
  2026-05-02 13:53:03.411019 INFO::Fitting model to feature number 2, f2
  2026-05-02 13:53:03.419899 INFO::Fitting model to feature number 3, f3
  2026-05-02 13:53:03.444934 INFO::Fitting model to feature number 4, f4
  2026-05-02 13:53:03.453992 INFO::Fitting model to feature number 5, f5
  2026-05-02 13:53:03.460414 INFO::Fitting model to feature number 6, f6
  2026-05-02 13:53:03.465618 INFO::Fitting model to feature number 7, f7
  2026-05-02 13:53:03.471014 INFO::Fitting model to feature number 8, f8
  2026-05-02 13:53:03.476052 INFO::Fitting model to feature number 9, f9
  2026-05-02 13:53:03.480924 INFO::Fitting model to feature number 10, f10
  2026-05-02 13:53:03.485658 INFO::Fitting model to feature number 11, f11
  2026-05-02 13:53:03.490842 INFO::Fitting model to feature number 12, f12
  2026-05-02 13:53:03.50237 INFO::Counting total values for each feature
  2026-05-02 13:53:03.505465 INFO::Writing filtered data to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/features/filtered_data.tsv
  2026-05-02 13:53:03.507489 INFO::Writing filtered, normalized data to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/features/filtered_data_norm.tsv
  2026-05-02 13:53:03.509272 INFO::Writing filtered, normalized, transformed data to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/features/filtered_data_norm_transformed.tsv
  2026-05-02 13:53:03.511264 INFO::Writing residuals to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/fits/residuals.rds
  2026-05-02 13:53:03.512584 INFO::Writing fitted values to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/fits/fitted.rds
  2026-05-02 13:53:03.51372 INFO::Writing all results to file (ordered by increasing q-values): /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/all_results.tsv
  2026-05-02 13:53:03.516064 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f41fed4c3/significant_results.tsv
  [1] "Creating output feature tables folder"
  [1] "Creating output fits folder"
  2026-05-02 13:53:03.524399 INFO::Writing function arguments to log file
  2026-05-02 13:53:03.532866 INFO::Verifying options selected are valid
  2026-05-02 13:53:03.53396 INFO::Determining format of input files
  2026-05-02 13:53:03.535467 INFO::Input format is data samples as rows and metadata samples as rows
  2026-05-02 13:53:03.538337 INFO::Formula for fixed effects: expr ~  Env
  2026-05-02 13:53:03.539877 INFO::Filter data based on min abundance and min prevalence
  2026-05-02 13:53:03.540843 INFO::Total samples in data: 12
  2026-05-02 13:53:03.541764 INFO::Min samples required with min abundance for a feature not to be filtered: 1.200000
  2026-05-02 13:53:03.543338 INFO::Total filtered features: 0
  2026-05-02 13:53:03.544384 INFO::Filtered feature names from abundance and prevalence filtering:
  2026-05-02 13:53:03.545893 INFO::Total filtered features with variance filtering: 0
  2026-05-02 13:53:03.546878 INFO::Filtered feature names from variance filtering:
  2026-05-02 13:53:03.547779 INFO::Running selected normalization method: TSS
  2026-05-02 13:53:03.549317 INFO::Applying z-score to standardize continuous metadata
  2026-05-02 13:53:03.553263 INFO::Running selected transform method: AST
  2026-05-02 13:53:03.554878 INFO::Running selected analysis method: LM
  2026-05-02 13:53:03.55584 INFO::Fitting model to feature number 1, f1
  2026-05-02 13:53:03.560375 INFO::Fitting model to feature number 2, f2
  2026-05-02 13:53:03.564987 INFO::Fitting model to feature number 3, f3
  2026-05-02 13:53:03.569612 INFO::Fitting model to feature number 4, f4
  2026-05-02 13:53:03.57421 INFO::Fitting model to feature number 5, f5
  2026-05-02 13:53:03.578858 INFO::Fitting model to feature number 6, f6
  2026-05-02 13:53:03.583513 INFO::Fitting model to feature number 7, f7
  2026-05-02 13:53:03.588006 INFO::Fitting model to feature number 8, f8
  2026-05-02 13:53:03.600668 INFO::Fitting model to feature number 9, f9
  2026-05-02 13:53:03.605597 INFO::Fitting model to feature number 10, f10
  2026-05-02 13:53:03.610215 INFO::Fitting model to feature number 11, f11
  2026-05-02 13:53:03.614745 INFO::Fitting model to feature number 12, f12
  2026-05-02 13:53:03.626449 INFO::Counting total values for each feature
  2026-05-02 13:53:03.63016 INFO::Writing filtered data to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/features/filtered_data.tsv
  2026-05-02 13:53:03.632517 INFO::Writing filtered, normalized data to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/features/filtered_data_norm.tsv
  2026-05-02 13:53:03.634807 INFO::Writing filtered, normalized, transformed data to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/features/filtered_data_norm_transformed.tsv
  2026-05-02 13:53:03.637434 INFO::Writing residuals to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/fits/residuals.rds
  2026-05-02 13:53:03.639201 INFO::Writing fitted values to file /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/fits/fitted.rds
  2026-05-02 13:53:03.640819 INFO::Writing all results to file (ordered by increasing q-values): /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/all_results.tsv
  2026-05-02 13:53:03.643636 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): /home/hornik/tmp/scratch/RtmpFIWCYR/ggpicrust2_maaslin2_8472f8cb9bf8/significant_results.tsv
  Disp = 1e-04 , BCV = 0.01 
  Disp = 1e-04 , BCV = 0.01 
  Saving _problems/test-pathway_daa-858.R
  Excluded 1 pathways with missing annotations. Use 'pathway_annotation' to add them.
  Excluded 1 rows with missing 'pathway_name' annotations.
  Saving _problems/test-pathway_errorbar-232.R
  Note: Preranked GSEA methods (fgsea, clusterProfiler) do not account for inter-gene correlations, which may lead to unreliable p-values (Wu et al., 2012). Consider using method='camera' or method='fry' for more reliable statistical inference.
  Using column 'sample_name' as sample identifier
  Using column 'sample_name' as sample identifier
  Testing 2 gene sets (filtered from 2 by size constraints)
  Note: Preranked GSEA methods (fgsea, clusterProfiler) do not account for inter-gene correlations, which may lead to unreliable p-values (Wu et al., 2012). Consider using method='camera' or method='fry' for more reliable statistical inference.
  Using column 'sample' as sample identifier
  Using column 'sample' as sample identifier
  The Sample Names in order from left to right are:
  S1, S2, S3, S4
  The Group Levels in order from left to right are:
  A, A, B, B
  Using column 'sample' as sample identifier
  The Sample Names in order from left to right are:
  S1, S2, S3, S4
  The Group Levels in order from left to right are:
  A, A, B, B
  Using column 'sample' as sample identifier
  The Sample Names in order from left to right are:
  S1, S2, S3, S4
  The Group Levels in order from left to right are:
  A, A, B, B
  Using column 'sample_name' as sample identifier
  Using column 'sample_name' as sample identifier
  Using column 'sample_name' as sample identifier
  Too few points to calculate an ellipse
  Too few points to calculate an ellipse
  Using column 'sample_name' as sample identifier
  Using column 'sample_name' as sample identifier
  Using column 'sample_name' as sample identifier
  [ FAIL 13 | WARN 3 | SKIP 13 | PASS 435 ]
  
  ══ Skipped tests (13) ══════════════════════════════════════════════════════════
  • On CRAN (4): 'test-pathway_ridgeplot.R:25:3',
    'test-pathway_ridgeplot.R:42:3', 'test-pathway_ridgeplot.R:65:3',
    'test-pathway_volcano.R:111:3'
  • Set GGPICRUST2_RUN_E2E_TESTS=true to run full ggpicrust2 end-to-end tests.
    (1): 'test-ggpicrust2-return-structure.R:4:3'
  • Set GGPICRUST2_RUN_EXTENDED_DAA_TESTS=true to run extended DAA method tests.
    (1): 'test-pathway_daa.R:102:3'
  • Set GGPICRUST2_RUN_NETWORK_TESTS=true to run network-dependent KEGG tests.
    (2): 'test-pathway_annotation.R:65:3', 'test-pathway_annotation.R:84:3'
  • empty test (1): 'test-pathway_annotation.R:218:1'
  • {ALDEx2} is not installed (1): 'test-pathway_daa.R:906:3'
  • {DESeq2} is not installed (2): 'test-pathway_daa.R:243:3',
    'test-pathway_daa.R:281:3'
  • {lefser} is not installed (1): 'test-pathway_daa.R:625:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-pathway_daa.R:32:3'): pathway_daa works with basic inputs ──────
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(td$abundance, td$metadata, "group", daa_method = "ALDEx2") at test-pathway_daa.R:32:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:49:3'): pathway_daa validates inputs correctly ───
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-pathway_daa.R:49:3
   2. │ └─testthat:::expect_condition_matching_(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─ggpicrust2::pathway_daa(...)
   8.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:86:5'): pathway_daa core methods produce expected results ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(...) at test-pathway_daa.R:86:5
   2. │ └─base::withCallingHandlers(...)
   3. └─ggpicrust2::pathway_daa(abundance, metadata, "group", daa_method = method)
   4.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:149:3'): pathway_daa handles sample selection correctly ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_daa.R:149:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:187:3'): pathway_daa select= keeps metadata rows aligned with abundance columns ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_daa.R:187:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:416:3'): pathway_daa rejects negative abundance values ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-pathway_daa.R:416:3
   2. │ └─testthat:::expect_condition_matching_(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─ggpicrust2::pathway_daa(abundance, metadata, "group", daa_method = "ALDEx2")
   8.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:440:3'): pathway_daa handles factor levels correctly with subset ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_daa.R:440:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:498:3'): pathway_daa handles p-value adjustment correctly ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_daa.R:498:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:520:3'): pathway_daa include_abundance_stats parameter works correctly ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_daa.R:520:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:551:3'): ALDEx2 returns effect size columns by default ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(td$abundance, td$metadata, "group", daa_method = "ALDEx2") at test-pathway_daa.R:551:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:574:3'): include_abundance_stats does not collide with method-native log2FC ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_daa.R:574:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_daa.R:849:3'): pathway_daa re-validates group count after align/select ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. ├─testthat::expect_error(...) at test-pathway_daa.R:849:3
   2. │ └─testthat:::expect_condition_matching_(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─ggpicrust2::pathway_daa(...)
   8.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  ── Error ('test-pathway_errorbar.R:227:3'): pathway_errorbar_table function works correctly ──
  Error in `require_package(method_packages[[daa_method]], purpose = daa_method)`: Package 'ALDEx2' is required for ALDEx2. Install with: BiocManager::install('ALDEx2')
  Backtrace:
      ▆
   1. └─ggpicrust2::pathway_daa(...) at test-pathway_errorbar.R:227:3
   2.   └─ggpicrust2:::require_package(method_packages[[daa_method]], purpose = daa_method)
  
  [ FAIL 13 | WARN 3 | SKIP 13 | PASS 435 ]
  Error:
  ! Test failures.
  Execution halted