Running ‘testthat.R’ [8m/25m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(ggalign)
  Loading required package: ggplot2
  ========================================
  ggalign version 1.2.0
  
  If you use it in published research, please cite: 
  Peng, Y.; Jiang, S.; Song, Y.; et al. ggalign: Bridging the Grammar of Graphics and Biological Multilayered Complexity. Advanced Science. 2025. doi:10.1002/advs.202507799
  ========================================
  > 
  > test_check("ggalign")
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  Saving 7 x 7 in image
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  Saving _problems/test-fortify-matrix-15.R
  `geom_subrect()` subdivide tile into a maximal of 5 rectangles
  `geom_subrect()` subdivide tile into a maximal of 9 rectangles
  `geom_subrect()` subdivide tile into a maximal of 4 rectangles
  `geom_subrect()` subdivide tile into a maximal of 4 rectangles
  `geom_subrect()` subdivide tile into a maximal of 4 rectangles
  `geom_subtile()` subdivide tile into a maximal of 5 rectangles
  `geom_subtile()` subdivide tile into a maximal of 9 rectangles
  `geom_subtile()` subdivide tile into a maximal of 4 rectangles
  `geom_subtile()` subdivide tile into a maximal of 4 rectangles
  `geom_subtile()` subdivide tile into a maximal of 4 rectangles
  Saving 7 x 7 in image
  NULL
  Saving 7 x 7 in image
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  Saving _problems/test-layout-heatmap-131.R
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  Saving 7 x 7 in image
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  Saving 7 x 7 in image
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  Saving 7 x 7 in image
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  > heatmap built with `geom_tile()`
  [ FAIL 2 | WARN 0 | SKIP 89 | PASS 340 ]
  
  ══ Skipped tests (89) ══════════════════════════════════════════════════════════
  • On CRAN (86): 'test-active.R:11:1', 'test-active.R:45:1',
    'test-align-hclust.R:5:1', 'test-align-hclust.R:14:1',
    'test-align-hclust.R:23:1', 'test-align-hclust.R:29:1',
    'test-align-hclust.R:35:1', 'test-align-hclust.R:41:1',
    'test-align-hclust.R:51:1', 'test-align-phylo.R:9:1',
    'test-align-phylo.R:36:1', 'test-align-phylo.R:45:1',
    'test-align-phylo.R:54:1', 'test-align-phylo.R:63:1',
    'test-align-phylo.R:72:1', 'test-alignpatch.R:13:1',
    'test-alignpatch.R:27:1', 'test-alignpatch.R:122:1',
    'test-alignpatch.R:145:1', 'test-alignpatch.R:205:1',
    'test-alignpatch.R:254:1', 'test-alignpatch.R:312:1',
    'test-alignpatch.R:354:1', 'test-alignpatch.R:408:1',
    'test-alignpatch.R:454:1', 'test-alignpatch.R:523:1', 'test-area.R:17:1',
    'test-as-grob.R:1:1', 'test-fortify-matrix.R:18:1',
    'test-fortify-matrix.R:76:1', 'test-free-guide.R:49:1', 'test-ggplot.R:1:1',
    'test-ggplot.R:20:1', 'test-ggplot.R:59:1', 'test-ggplot.R:87:1',
    'test-ggplot.R:105:1', 'test-ggplot.R:123:1', 'test-ggplot.R:141:1',
    'test-ggplot.R:210:1', 'test-ggplot.R:231:1', 'test-ggplot.R:240:1',
    'test-ggplot.R:261:1', 'test-ggplot.R:276:1', 'test-grid.R:1:1',
    'test-grid.R:19:1', 'test-grid.R:50:1', 'test-inset.R:26:1',
    'test-inset.R:36:1', 'test-layout-chain.R:13:1', 'test-layout-chain.R:68:1',
    'test-layout-chain.R:229:1', 'test-layout-circle.R:35:1',
    'test-layout-circle.R:67:1', 'test-layout-heatmap.R:1:1',
    'test-layout-heatmap.R:27:1', 'test-layout-heatmap.R:60:1',
    'test-layout-heatmap.R:168:1', 'test-layout-heatmap.R:246:1',
    'test-layout-heatmap.R:323:1', 'test-layout-quad.R:1:1',
    'test-layout-quad.R:9:1', 'test-layout-quad.R:55:1',
    'test-layout-quad.R:98:1', 'test-layout-quad.R:129:1',
    'test-layout-quad.R:169:1', 'test-layout-quad.R:300:1',
    'test-layout-quad.R:345:1', 'test-layout-quad.R:499:1',
    'test-layout-stack.R:37:1', 'test-layout-stack.R:49:1',
    'test-layout-stack.R:77:1', 'test-layout-stack.R:125:1',
    'test-layout-stack.R:169:1', 'test-layout-stack.R:185:1', 'test-link.R:1:1',
    'test-link.R:44:1', 'test-mark.R:1:1', 'test-mark.R:45:1',
    'test-pair-links.R:18:1', 'test-plot-align.R:1:1', 'test-plot-align.R:38:1',
    'test-plot-align.R:97:1', 'test-plot-align.R:138:1',
    'test-plot-align.R:174:1', 'test-plot-align.R:268:1', 'test-plot.R:7:1'
  • empty test (3): 'test-layout-chain.R:239:1', 'test-layout-chain.R:242:1',
    'test-layout-chain.R:246:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-fortify-matrix.R:12:5'): `MAF` method calculate variant_weights ──
  Error in ``[.data.table`(maf.con.class.summary, , `:=`(fract, (nVars/sum(nVars)) * 100), by = .(Tumor_Sample_Barcode))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-fortify-matrix.R:12:5
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─base::rowSums(ggalign_attr(fortify_matrix(laml), "variant_weights")[-1])
    5. │ └─base::is.data.frame(x)
    6. ├─ggalign::ggalign_attr(fortify_matrix(laml), "variant_weights")
    7. │ └─ggalign:::ggalign_attr_get(x)
    8. ├─ggalign::fortify_matrix(laml)
    9. └─ggalign:::fortify_matrix.MAF(laml)
   10.   └─maftools::titv(data, useSyn = use_syn, plot = FALSE)
   11.     ├─...[]
   12.     └─data.table:::`[.data.table`(...)
  ── Error ('test-layout-heatmap.R:122:5'): `ggoncoplot()` with maftools works well ──
  Error in ``[.data.table`(maf.con.class.summary, , `:=`(fract, (nVars/sum(nVars)) * 100), by = .(Tumor_Sample_Barcode))`: attempt access index 3/3 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─vdiffr::expect_doppelganger(...) at test-layout-heatmap.R:122:5
    2. │ └─vdiffr (local) writer(fig, testcase, title)
    3. │   └─vdiffr:::print_plot(plot, title)
    4. ├─ggalign::ggoncoplot(...)
    5. └─ggalign:::ggoncoplot.default(...)
    6.   ├─ggalign::fortify_matrix(data = data, ...)
    7.   └─ggalign:::fortify_matrix.MAF(data = data, ...)
    8.     └─maftools::titv(data, useSyn = use_syn, plot = FALSE)
    9.       ├─...[]
   10.       └─data.table:::`[.data.table`(...)
  
  [ FAIL 2 | WARN 0 | SKIP 89 | PASS 340 ]
  Deleting unused snapshots: 'layout-heatmap/gistic-oncoplot.svg',
  'layout-heatmap/maf-filter-oncoplot.svg', and
  'layout-heatmap/maf-pathway-oncoplot.svg'
  Error:
  ! Test failures.
  Execution halted