Back to Mac ARM64 build report for BioC 3.17
ABCDEFGHIJKLMN[O]PQRSTUVWXYZ

This page was generated on 2023-10-20 09:38:08 -0400 (Fri, 20 Oct 2023).

HostnameOSArch (*)R versionInstalled pkgs
kjohnson2macOS 12.6.1 Montereyarm644.3.1 (2023-06-16) -- "Beagle Scouts" 4347
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 1423/2230HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
omicsViewer 1.4.0  (landing page)
Chen Meng
Snapshot Date: 2023-10-15 14:00:07 -0400 (Sun, 15 Oct 2023)
git_url: https://git.bioconductor.org/packages/omicsViewer
git_branch: RELEASE_3_17
git_last_commit: 34e4d9d
git_last_commit_date: 2023-04-25 11:38:01 -0400 (Tue, 25 Apr 2023)
kjohnson2macOS 12.6.1 Monterey / arm64  OK    OK    OK    OK  UNNEEDED, same version is already published

CHECK results for omicsViewer on kjohnson2


To the developers/maintainers of the omicsViewer package:
- Use the following Renviron settings to reproduce errors and warnings.
- If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information.

raw results


Summary

Package: omicsViewer
Version: 1.4.0
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:omicsViewer.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings omicsViewer_1.4.0.tar.gz
StartedAt: 2023-10-18 12:25:26 -0400 (Wed, 18 Oct 2023)
EndedAt: 2023-10-18 12:33:02 -0400 (Wed, 18 Oct 2023)
EllapsedTime: 455.3 seconds
RetCode: 0
Status:   OK  
CheckDir: omicsViewer.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:omicsViewer.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings omicsViewer_1.4.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/Users/biocbuild/bbs-3.17-bioc-mac-arm64/meat/omicsViewer.Rcheck’
* using R version 4.3.1 (2023-06-16)
* using platform: aarch64-apple-darwin20 (64-bit)
* R was compiled by
    Apple clang version 14.0.0 (clang-1400.0.29.202)
    GNU Fortran (GCC) 12.2.0
* running under: macOS Monterey 12.6.7
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘omicsViewer/DESCRIPTION’ ... OK
* this is package ‘omicsViewer’ version ‘1.4.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘omicsViewer’ can be installed ... OK
* checking installed package size ... NOTE
  installed size is  5.4Mb
  sub-directories of 1Mb or more:
    extdata   4.8Mb
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
Examples with CPU (user + system) or elapsed time > 5s
                 user system elapsed
prepOmicsViewer 3.708  0.050   5.762
multi.t.test    3.213  0.135   5.101
getAutoRIF      0.040  0.016  34.410
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘test_auxi_sparse_converter.R’
  Running ‘test_db_vs_esv.R’
  Running ‘test_motif.R’
  Running ‘test_ora.R’
  Running ‘test_shinyAuxi.R’
  Running ‘test_stats.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 1 NOTE
See
  ‘/Users/biocbuild/bbs-3.17-bioc-mac-arm64/meat/omicsViewer.Rcheck/00check.log’
for details.



Installation output

omicsViewer.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL omicsViewer
###
##############################################################################
##############################################################################


* installing to library ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library’
* installing *source* package ‘omicsViewer’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (omicsViewer)

Tests output

omicsViewer.Rcheck/tests/test_auxi_sparse_converter.Rout


R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(omicsViewer)
> library(Matrix)
> library(unittest, quietly = TRUE)
> 
> # source("R/auxi_sparse_converter.R")
> 
> m <- matrix(0, 10, 5, dimnames = list(paste0("R", 1:10), paste0("C", 1:5)))
> for (i in 2:ncol(m)) {
+    m[i*2, i] <- 1
+ }
> 
> csc <- as(m, "dgCMatrix")
> ok(ut_cmp_equal(colSums(csc), colSums(m)), "as sparse")
ok - as sparse
> 
> scc <- omicsViewer:::csc2list(csc)
> csc2 <- omicsViewer:::list2csc(scc, dimnames = list(rownames(m)))
> ok(ut_cmp_equal(colSums(csc2), colSums(m)[-1], check.attributes = FALSE), 
+    "only rownames, missing 0 column")
ok - only rownames, missing 0 column
> 
> csc3 <- omicsViewer:::list2csc(scc, dimnames = list(rownames(m), colnames(m)))
> ok(ut_cmp_equal(colSums(csc3), colSums(m), check.attributes = FALSE), 
+    "both rownames and columns given")
ok - both rownames and columns given
> ok(ut_cmp_equal(as(csc3, "matrix"), m, check.attributes = FALSE), 
+    "regular matrix")
ok - regular matrix
> 
> scc2 <- scc
> scc2$weight <- NULL
> csc4 <- omicsViewer:::list2csc(scc2, dimnames = list(rownames(m), colnames(m)))
> ok(ut_cmp_equal(colSums(csc4), colSums(m), check.attributes = FALSE), 
+    "as binary matrix")
ok - as binary matrix
> 
> 
> # ================= conversion of hclust object =================
> m <- matrix(rnorm(50), 25, dimnames = list(paste0("g", 1:25), c('c1', 'c2')))
> hc <- hclust(dist(m))
> plot(hc)
> te <- omicsViewer:::hclust2str(hc)
> hc2 <- omicsViewer:::str2hclust(te)
> plot(hc2)
> hc_elements <- names(hc)
> ok(ut_cmp_equal(all(names(hc2) %in% hc_elements), TRUE), "Element name test")
ok - Element name test
> j <- sapply(setdiff(hc_elements, "call"), function(x) 
+   all.equal(hc[[x]], hc2[[x]], tol = 5e-5, check.attributes = FALSE))
> ok(ut_cmp_equal(all(j), TRUE), "HCL element conversion test.")
ok - HCL element conversion test.
> 
> 
> # ===================== select highlight block ===================
> cl <- list(x = -5:5, y = c(5:0, 1:5))
> line_rect <- omicsViewer:::line_rect
> r <- line_rect(coord = cl, l = list(x = 2.5, y = 2.5, corner = "topright"))
> ok(
+   ut_cmp_equal(
+     r$rect[[1]][c("x0", "y0")], c(2.5, 2.5), check.attributes = FALSE
+     ), "line_rect - topright"
+ )
ok - line_rect - topright
> 
> r <- line_rect(coord = cl, l = list(x = 2.5, y = 2.5, corner = "volcano"))
> ok(
+   ut_cmp_identical(length(r$rect), as.integer(2)),
+   "line_rect - volcano n block"
+ )
ok - line_rect - volcano n block
> ok(
+   ut_cmp_equal(
+     r$rect[[1]][c("x1", "y0")], c(-2.5, 2.5), check.attributes = FALSE
+     ), "line_rect - volcano block 1"
+ )
ok - line_rect - volcano block 1
> ok(
+   ut_cmp_equal(
+     r$rect[[2]][c("x0", "y0")], c(2.5, 2.5), check.attributes = FALSE
+     ), "line_rect - volcano block 2"
+ )
ok - line_rect - volcano block 2
> 
> ok(
+   ut_cmp_identical(
+     line_rect(coord = cl, l = list(y = 2.5, corner = "volcano")), NULL
+     ), "line_rect - NULL 1"
+ )
ok - line_rect - NULL 1
> 
> ok(
+   ut_cmp_identical(
+     line_rect(coord = cl, l = list(x = 2.5, corner = "volcano")), NULL
+   ), "line_rect - NULL 2"
+ )
ok - line_rect - NULL 2
> 
> ok(
+   ut_cmp_identical(
+     line_rect(coord = cl, l = list(x = 2.5, y = 2.5, corner = "None")), NULL
+   ), "line_rect - NULL 3"
+ )
ok - line_rect - NULL 3
> 
> 
> proc.time()
   user  system elapsed 
  9.259   0.537  15.016 
# Looks like you passed all 14 tests.

omicsViewer.Rcheck/tests/test_db_vs_esv.Rout


R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(unittest, quietly = TRUE)
> library(RSQLite)
> library(omicsViewer)
> 
> 
> f <- system.file(package = 'omicsViewer', 'extdata/demo.RDS')
> obj <- readRDS(f)
> dd <- tools::R_user_dir("omicsViewer", which="cache")
> dir.create(dd)
Warning message:
In dir.create(dd) :
  '/Users/biocbuild/Library/Caches/org.R-project.R/R/omicsViewer' already exists
> db <- file.path(dd, "temp.db")
> savedPath <- saveOmicsViewerDb(obj, db)
> ok(ut_cmp_identical(is.character(savedPath), TRUE), "save sqlite database")
ok - save sqlite database
> 
> esv1 <- readESVObj(f)
> ok(ut_cmp_identical(inherits(esv1, "ExpressionSet"), TRUE), "read expressionset")
ok - read expressionset
> 
> esv2 <- readESVObj(db)
> ok(ut_cmp_identical(inherits(esv2, "SQLiteConnection"), TRUE), "connect to database")
ok - connect to database
> 
> getExprs <- omicsViewer:::getExprs
> expr1 <- getExprs(esv1)
> expr2 <- getExprs(esv2)
> ok(ut_cmp_identical(expr1, expr2), "db vs esv - expression")
ok - db vs esv - expression
> 
> getExprsImpute <- omicsViewer:::getExprsImpute
> expr1 <- getExprsImpute(esv1)
> expr2 <- getExprsImpute(esv2)
> ok(ut_cmp_identical(expr1, expr2), "db vs esv - expression imputed")
ok - db vs esv - expression imputed
> 
> 
> getPData <- omicsViewer:::getPData
> getFData <- omicsViewer:::getFData
> getAx <- omicsViewer:::getAx
> getDend <- omicsViewer:::getDend
> 
> pd1 <- getPData(esv1)
> pd2 <- getPData(esv2)
> ok(ut_cmp_identical(colnames(pd1), colnames(pd2)), "db vs esv - phenotype 1")
ok - db vs esv - phenotype 1
> ok(ut_cmp_identical(rownames(pd1), rownames(pd2)), "db vs esv - phenotype 2")
ok - db vs esv - phenotype 2
> 
> fd1 <- getFData(esv1)
> fd2 <- getFData(esv2)
> ok(ut_cmp_identical(rownames(fd1), rownames(fd2)), "db vs esv - feature data")
ok - db vs esv - feature data
> 
> for (i in c("sx", "sy", "fx", "fy")) {
+   ax1 <- getAx(esv1, i)
+   ax2 <- getAx(esv2, i)
+   ok(ut_cmp_identical(ax1, ax2), sprintf("db vs esv - get axis - %s", i))
+ }
ok - db vs esv - get axis - sx
ok - db vs esv - get axis - sy
ok - db vs esv - get axis - fx
ok - db vs esv - get axis - fy
> 
> dd2 <- getDend(esv2)
> ok(ut_cmp_identical(dd2, NULL), "db get dend")
ok - db get dend
> 
> 
> proc.time()
   user  system elapsed 
 12.548   0.671  20.133 
# Looks like you passed all 13 tests.

omicsViewer.Rcheck/tests/test_motif.Rout


R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(unittest)
> 
> seqs <- c("PFERVGTATIDNLPT", "MCWPEYCHCLKPIAS", "HRPQTSVNMQDMDPC", "HRPQTSVNMQDMDPCUU")
> aaFreq <- omicsViewer:::aaFreq
> fq <- aaFreq(seqs[1:3])
> ok(
+   ut_cmp_equal(dim(fq), c(20, 15)),
+   "aaFreq - dimension check"
+   )
ok - aaFreq - dimension check
> ok(
+   ut_cmp_equal(colSums(fq), rep(1, 15)),
+   "aaFreq - colSum check"
+   )
ok - aaFreq - colSum check
> ok(
+   ut_cmp_error(aaFreq(seqs), "Different length in x!"),
+   "aaFreq - length check"
+   )
ok - aaFreq - length check
> 
> 
> seqs <- c("PFERVGTATIDNLPT", "MCWPEYCHCLKPIAS", "HRPQTSVNMQDMDPC", "HRPQTSVNMQDMDPC", "HRPQTSVNMQDMDPC")
> motifRF <- omicsViewer:::motifRF
> sq <- motifRF(fg.seqs = seqs[3:5], bg.seqs = seqs, fg.pfm = NULL, bg.pfm=NULL)
> ok(
+   ut_cmp_equal(dim(sq), c(20, 15)),
+   "motifRF - dim check"
+   )
ok - motifRF - dim check
> ok(
+   ut_cmp_equal(unique(c(sq)), c(0, 1)),
+   "motifRF - value check"
+   )
ok - motifRF - value check
> ok(
+   ut_cmp_equal(c(table(sq)), c(285, 15), check.attributes = FALSE),
+   "motifRF - value count check"
+   )
ok - motifRF - value count check
> 
> proc.time()
   user  system elapsed 
  9.066   0.523  14.693 
# Looks like you passed all 6 tests.

omicsViewer.Rcheck/tests/test_ora.Rout


R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(omicsViewer)
> library(unittest, quietly = TRUE)
> library(Matrix)
> library(fastmatch)
> 
> # =========================== conversion ========================
> gs <- cbind(
+   s1 = c(1, 1, 1, 1, 0, 0, 0, 0),
+   s2 = c(0, 0, 0, 0, 1, 1, 1, 1),
+   s3 = c(0, 0, 1, 1, 1, 1, 0, 0))
> stats <- 1:8
> rownames(gs) <- names(stats) <- paste0("g", 1:8)
> gss <- as(gs, "dgCMatrix")
> ok(ut_cmp_equal(omicsViewer:::csc2list(gs), omicsViewer:::csc2list(gss)), 
+   "convert matrix to data.frame for fgsea")
ok - convert matrix to data.frame for fgsea
> df <- omicsViewer:::csc2list(gs)
> ok(
+   ut_cmp_equal(
+     gss, omicsViewer:::list2csc(df, dimnames = dimnames(gs)), check.attributes = FALSE
+     ), "convert data.frame to matrix"
+    )
ok - convert data.frame to matrix
> 
> vectORA <- omicsViewer:::vectORA
> r1 <- vectORA( gs, i = 1:4, minOverlap = 1, minSize = 1 )
> r2 <- vectORA( gss, i = 1:4, minOverlap = 1, minSize = 1 )
> vectORATall <- omicsViewer:::vectORATall
> r3 <- vectORATall( df, i=rownames(gs)[1:4], background=8 )
> 
> ok(
+   ut_cmp_equal(r1$pathway, c("s1", "s3"), check.attributes = FALSE),
+   "vectORA 1"
+   )
ok - vectORA 1
> ok(ut_cmp_equal(r1, r2, check.attributes = FALSE), "vectORA 2")
ok - vectORA 2
> ok(ut_cmp_equal(r1, r3), "vectORATall")
ok - vectORATall
> 
> 
> 
> res <- omicsViewer:::fgsea1(
+   gs = gss, stats = stats, minSize = 1, maxSize = 500, sampleSize = 3)
Warning message:
In preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam,  :
  All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".
> ut_cmp_identical(res$pathway, colnames(gss))
> ok(ut_cmp_equal(res$pval[1] < 0.2, TRUE), "fgsea significant pathway 1")
ok - fgsea significant pathway 1
> ok(ut_cmp_equal(res$pval[2] < 0.2, TRUE), "fgsea significant pathway 2")
ok - fgsea significant pathway 2
> ok(ut_cmp_equal(res$pval[3] > 0.6, TRUE), "fgsea insignificant pathway")
ok - fgsea insignificant pathway
> 
> totall <- omicsViewer:::totall
> tgs <- totall(gs)
> ok(ut_cmp_identical(colnames(tgs), c("featureId", "gsId", "weight")), 
+   "totall 1")
ok - totall 1
> ok(ut_cmp_equal(nrow(tgs), 12), "totall 2")
ok - totall 2
> 
> 
> # ====================== trisetters ==========================
> 
> expr <- matrix(1:6, 3, 2)
> rownames(expr) <- c("g1", "g2", "g3")
> colnames(expr) <- c("s1", "s2")
> 
> m1 <- data.frame(
+   "F1|pos2|pos3" = 1:3,
+   "F2|pos2|pos3" = 1:3,
+   check.names = FALSE
+ )
> rownames(m1) <- rownames(expr)
> 
> m2 <- data.frame(
+   "var1|pos2|pos3" = 1:2,
+   "var2|pos2|pos3" = 1:2,
+   check.names = FALSE
+ )
> rownames(m2) <- colnames(expr)
> 
> trisetter <- omicsViewer:::trisetter
> 
> f1 <- rbind(c("F1", "pos2", "pos3"),
+             c("F2", "pos2", "pos3"))
> ok(
+   ut_cmp_equal(
+     trisetter(meta = m1, expr=NULL, combine="none"), f1,
+     check.attributes = FALSE
+   ),
+   "trisetter feature meta"
+ )
ok - trisetter feature meta
> 
> var1 <- rbind(c("var1", "pos2", "pos3"),
+               c("var2", "pos2", "pos3"))
> ok(
+   ut_cmp_equal(
+     trisetter(meta = m2, expr=NULL, combine="none"), var1,
+     check.attributes = FALSE
+   ),
+   "trisetter pheno meta"
+ )
ok - trisetter pheno meta
> 
> cf1 <- rbind(f1, c("Sample", "Auto", "s1"),
+              c("Sample", "Auto", "s2"))
> ok(
+   ut_cmp_equal(
+     trisetter(meta = m1, expr=expr, combine="feature"), cf1,
+     check.attributes = FALSE
+   ),
+   "trisetter feature combined with expr"
+ )
ok - trisetter feature combined with expr
> cvar1 <- rbind(var1, 
+                c("Feature", "Auto", "g1"),
+                c("Feature", "Auto", "g2"),
+                c("Feature", "Auto", "g3"))
> ok(
+   ut_cmp_equal(
+     trisetter(meta = m2, expr=expr, combine="pheno"), cvar1,
+     check.attributes = FALSE
+   ),
+   "trisetter pheno combined with expr"
+ )
ok - trisetter pheno combined with expr
> 
> varSelector <- omicsViewer:::varSelector
> l1 <- list(analysis = "Feature", subset= "Auto", variable = "g1")
> ok(
+ ut_cmp_equal(
+   varSelector(x = l1, expr = expr, meta = m2),
+   c(1, 4),
+   check.attributes = FALSE
+   ),
+ "select from triselector - feature"
+ )
ok - select from triselector - feature
>   
> l1 <- list(analysis = "Sample", subset= "Auto", variable = "s1")
> ok(
+ ut_cmp_equal(
+   varSelector(x = l1, expr = expr, meta = m2), 
+   1:3, 
+   check.attributes = FALSE),
+ "select from triselector - sample"
+ )
ok - select from triselector - sample
> text2num <- omicsViewer:::text2num
> ok(ut_cmp_equal(text2num("-log10(0.01)"), -log10(0.01)), "text2num - 1")
ok - text2num - 1
> ok(ut_cmp_equal(text2num("0.05"), 0.05), "text2num - 2")
ok - text2num - 2
> 
> ######################################
> terms <- data.frame(
+   id = c("ID1", "ID2", "ID1", "ID2", "ID8", "ID10"),
+  term = c("T1", "T1", "T2", "T2", "T2", "T2"),
+   stringsAsFactors = FALSE
+ )
> features <- list(c("ID1", "ID2"), c("ID13"), c("ID4", "ID8", "ID10"))
> gsAnnotIdList(idList = features, gsIdMap = terms, minSize = 1, maxSize = 500)
3 x 2 sparse Matrix of class "dgCMatrix"
     T1 T2
[1,]  1  1
[2,]  .  .
[3,]  .  1
> 
> terms <- data.frame(
+ id = c("ID1", "ID2", "ID1", "ID2", "ID8", "ID10", "ID4", "ID4"),
+ term = c("T1", "T1", "T2", "T2", "T2", "T2", "T1", "T2"),
+ stringsAsFactors = FALSE
+ )
> features <- list(F1 = c("ID1", "ID2", "ID4"), F2 = c("ID13"), F3 = c("ID4", "ID8", "ID10"))
> 
> res <- data.frame(
+   featureId = c(1, 1, 3, 3),
+   gsId = c("T1", "T2", "T2", "T1"),
+   weight = rep(1, 4),
+   stringsAsFactors = FALSE
+ )
> r1 <- gsAnnotIdList(features, gsIdMap = terms, data.frame = TRUE, minSize = 1)
> ok(ut_cmp_equal(r1, res, check.attributes = FALSE), 
+    "gsAnnotIdList data.frame"
+    )
ok - gsAnnotIdList data.frame
> 
> res <- sparseMatrix(i = c(1, 1, 3, 3), j = c(1, 2, 1, 2), x = 1)
> colnames(res) <- c("T1", "T2")
> r2 <- gsAnnotIdList(features, gsIdMap = terms, data.frame = FALSE, minSize = 1)
> ok(ut_cmp_equal(r2, res), "gsAnnotIdList sparseMatrix")
ok - gsAnnotIdList sparseMatrix
> 
> # ==============================================
> xq <- rbind(c(4, 2, 4),
+             c(20, 40, 10),
+             c(11, 234, 10),
+             c(200, 1000, 100))
> 
> vectORA.core <- omicsViewer:::vectORA.core
> r1 <- vectORA.core(xq[1, ], xq[2, ], xq[3, ], xq[4, ])
> r2 <- vectORA.core(xq[1, ], xq[2, ], xq[3, ], xq[4, ], unconditional.or = FALSE)
> 
> ok(ut_cmp_equal(r1$p.value, r2$p.value), "vecORA.core 1")
ok - vecORA.core 1
> 
> # fisher's test
> pv <- t(apply(xq, 2, function(x1) {
+   m <- rbind(c(x1[1], x1[2]-x1[1]),
+              c(x1[3]-x1[1], x1[4] - x1[2] - x1[3] + x1[1]))
+   v <- fisher.test(m, alternative = "greater")
+   c(p.value = v$p.value, v$estimate)
+ }))
> 
> ok(ut_cmp_equal(r1$p.value, pv[, "p.value"]), "vectORA.core - conditional OR")
ok - vectORA.core - conditional OR
> ok(ut_cmp_equal(r2$OR, pv[, "odds ratio"]), "vectORA - unconditional OR")
ok - vectORA - unconditional OR
> 
> 
> proc.time()
   user  system elapsed 
 11.988   0.612  19.310 
# Looks like you passed all 23 tests.

omicsViewer.Rcheck/tests/test_shinyAuxi.Rout


R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(unittest)
> library(RColorBrewer)
> 
> nColors <- omicsViewer:::nColors
> ok(ut_cmp_equal(nColors(k=0, stop = FALSE), NULL), "nColors - return NULL when not stop")
ok - nColors - return NULL when not stop
> ok(ut_cmp_error(nColors(k=0, stop = TRUE), "k should be an integer between 1 and 60!"), 
+    "nColors - stop only when stop")
ok - nColors - stop only when stop
> 
> null2empty <- omicsViewer:::null2empty
> ok(ut_cmp_identical(null2empty(NULL), ""), "null2empty")
ok - null2empty
> 
> getSearchCols <- omicsViewer:::getSearchCols
> ok(ut_cmp_identical(getSearchCols(NULL), NULL), "getSearchCols - return NULL when NULL given")
ok - getSearchCols - return NULL when NULL given
> 
> getOrderCols <- omicsViewer:::getOrderCols
> ok(ut_cmp_identical(getOrderCols(NULL), NULL), "getOrderCols - return NULL when NULL given")
ok - getOrderCols - return NULL when NULL given
> 
> exprsImpute <- omicsViewer:::getExprsImpute
> ok(ut_cmp_identical(exprsImpute("5"), NULL), "exprsImpute - return NULL when error")
ok - exprsImpute - return NULL when error
> 
> 
> value2color <- omicsViewer:::value2color
> l <- value2color(1:100, n=10)
> ok(
+    ut_cmp_equal(names(l), c("color", "key")),
+    "value2color - return color and key"
+    ) 
ok - value2color - return color and key
> ok(
+    ut_cmp_equal(length(l$color), 100),
+    "value2color - return color correct length"
+    ) 
ok - value2color - return color correct length
> ok(
+    ut_cmp_equal(c(table(l$color)), rep(10, 10), check.attributes = FALSE),
+    "value2color - return key correct length"
+    ) 
ok - value2color - return key correct length
> ok(
+    ut_cmp_equal(length(unique(l$key)), 10),
+    "value2color - return color correct unique length"
+    ) 
ok - value2color - return color correct unique length
> 
> proc.time()
   user  system elapsed 
  9.145   0.539  14.859 
# Looks like you passed all 10 tests.

omicsViewer.Rcheck/tests/test_stats.Rout


R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(unittest)
> correlationAnalysis <- omicsViewer:::correlationAnalysis
> 
> ph <- data.frame(
+   set  = 1:15
+ )
> expr <- rbind(1:15, matrix(rnorm(150), 10, 15))
> res <- correlationAnalysis(expr, ph, prefix = "test")
> ok(ut_cmp_equal(
+   colnames(res), 
+   c("test|set|R", "test|set|N", "test|set|P", "test|set|logP", "test|set|range")),
+   "correlationAnalysis - colnames"
+   )
ok - correlationAnalysis - colnames
> ok(
+   ut_cmp_equal( nrow(res), 11 ),
+   "correlationAnalysis - row numbers"
+ )
ok - correlationAnalysis - row numbers
> ok(
+   ut_cmp_equal( res[1, 1], 1 ),
+   "correlationAnalysis - correlation 1"
+ )
ok - correlationAnalysis - correlation 1
> 
> 
> ph <- data.frame(
+   var1  = rep(LETTERS[1:2], each = 6),
+   var2  = rep(c("C", "D", "C", "D"), each = 3),
+   stringsAsFactors = FALSE, 
+   row.names = paste("S", 1:12, sep = "")
+ )
> cmp <- rbind(
+   c("var1", "A", "B"),
+   c("var2", "C", "D")
+ )
> expr <- cbind(matrix(rnorm(60), 10), matrix(rnorm(60, mean = 3), 10))
> colnames(expr) <- rownames(ph)
> rownames(expr) <- paste("P", 1:10, sep = "")
> 
> multi.t.test <- omicsViewer:::multi.t.test
> res <- multi.t.test(x = expr, pheno = ph, compare = cmp)
> ok(
+   ut_cmp_equal(all(res$`ttest|A_vs_B|pvalue` < res$`ttest|C_vs_D|pvalue`), TRUE),
+   "multi.t.test - significance"
+ )
ok - multi.t.test - significance
> 
> exprspca <- omicsViewer:::exprspca
> pcres <- exprspca(expr, n = 3)
> ok(ut_cmp_equal(dim(pcres$samples), c(12, 3)), "exprspca sample")
ok - exprspca sample
> ok(ut_cmp_equal(dim(pcres$features), c(10, 3)), "exprspca sample")
ok - exprspca sample
> 
> exprNA <- expr
> exprNA[1, 1:11] <- NA
> fillNA <- omicsViewer:::fillNA
> res <- fillNA(exprNA)
> ok(ut_cmp_equal(length(unique(res[1, 1:11])), 1), "fillNA")
ok - fillNA
> 
> proc.time()
   user  system elapsed 
  9.149   0.533  14.787 
# Looks like you passed all 7 tests.

Example timings

omicsViewer.Rcheck/omicsViewer-Ex.timings

nameusersystemelapsed
app_module0.0010.0000.001
app_ui0.0010.0000.004
correlationAnalysis0.0240.0090.051
draw_roc_pr0.1300.0140.218
exprspca0.7610.0171.141
extendMetaData0.0890.0020.132
fgsea10.0000.0010.000
fillNA0.0020.0000.005
filterRow0.0020.0000.004
getAutoRIF 0.040 0.01634.410
gsAnnotIdList0.0170.0020.028
hclust2str0.0000.0010.001
multi.t.test3.2130.1355.101
nColors0.0000.0000.001
normalize.nQuantiles0.0870.0050.140
normalize.totsum0.0160.0020.030
normalizeColWise0.0440.0030.080
normalizeData0.0440.0030.072
omicsViewer0.0000.0010.001
plot_roc_pr_module0.0010.0000.004
plotly_boxplot_module0.0020.0000.002
plotly_boxplot_ui0.0020.0000.002
plotly_scatter_module0.0070.0010.012
plotly_scatter_ui0.0070.0010.010
prepOmicsViewer3.7080.0505.762
readESVObj0.7970.0241.255
read_gmt0.0670.0010.109
removeVarQC0.0200.0010.031
rowshift0.0190.0020.031
saveOmicsViewerDb0.1350.0040.214
triselector_module0.0030.0010.007
triselector_ui0.0030.0010.004