The 'kjohnson3' built report say: (https://bioconductor.org/checkResults/release/bioc-mac-arm64-LATEST/GenomAutomorphism/kjohnson3-checksrc.html)
The Failure ('test-aa_mutmat.R:7:6'): mat && aa is not TRUE
actual
: FALSE
expected
: TRUE
I just run the current R script and it did not yield any error. This testing is in Ubuntu, I am not a Mac Computer user. Do I missing something?
library(GenomAutomorphism)
library(testthat)
data("aaindex2", package = "GenomAutomorphism" )
mat <- aa_mutmat(aaindex = "aaindex2", acc_list = TRUE)
mat <- grepl("MIYS930101", mat[37])
aa <- aa_mutmat(acc = "MIYS930101", aaindex = "aaindex2")
aa <- sum(aa[1,]) == -2.96
expect_true(mat && aa) ## No error from my side
sessionInfo( )
# R version 4.4.0 (2024-04-24)
# Platform: x86_64-pc-linux-gnu
# Running under: Ubuntu 22.04.4 LTS
#
# Matrix products: default
# BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
# LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#
# locale:
# [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
# [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
# [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
# [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#
# time zone: America/New_York
# tzcode source: system (glibc)
#
# attached base packages:
# [1] stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] testthat_3.2.1.1 GenomAutomorphism_1.5.0
#
# loaded via a namespace (and not attached):
# [1] jsonlite_1.8.8 dplyr_1.1.4 compiler_4.4.0
# [4] crayon_1.5.2 brio_1.1.5 tidyselect_1.2.1
# [7] GenomicRanges_1.55.4 Biostrings_2.71.6 parallel_4.4.0
# [10] IRanges_2.37.1 BiocParallel_1.37.1 R6_2.5.1
# [13] XVector_0.43.1 generics_0.1.3 knitr_1.46
# [16] GenomeInfoDb_1.39.14 BiocGenerics_0.49.1 iterators_1.0.14
# [19] tibble_3.2.1 numbers_0.8-5 GenomeInfoDbData_1.2.12
# [22] pillar_1.9.0 rlang_1.1.3 utf8_1.2.4
# [25] xfun_0.43 doParallel_1.0.17 cli_3.6.2
# [28] magrittr_2.0.3 zlibbioc_1.49.3 foreach_1.5.2
# [31] rstudioapi_0.16.0 lifecycle_1.0.4 waldo_0.5.2
# [34] S4Vectors_0.41.7 vctrs_0.6.5 glue_1.7.0
# [37] data.table_1.15.4 codetools_0.2-20 stats4_4.4.0
# [40] fansi_1.0.6 httr_1.4.7 matrixStats_1.3.0
# [43] tools_4.4.0 pkgconfig_2.0.3 UCSC.utils_0.99.7
Indeed. Calculations involving floating point arithmetic are architecture-dependent, and testing the results should be done with
all.equal()
rather than==
oridentical()
to leave room for some rounding error. E.g. on my 64-bit Intel Linux laptop:The first two comparisons will give
TRUE
orFALSE
depending on the architecture. Only the 3rd comparison is portable (i.e. should always beTRUE
).btw that was run on M1 mac