Back to Multiple platform build/check report for BioC 3.16:   simplified   long
ABCDEFGHIJKLMN[O]PQRSTUVWXYZ

This page was generated on 2023-04-12 11:05:12 -0400 (Wed, 12 Apr 2023).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 20.04.5 LTS)x86_644.2.3 (2023-03-15) -- "Shortstop Beagle" 4502
palomino4Windows Server 2022 Datacenterx644.2.3 (2023-03-15 ucrt) -- "Shortstop Beagle" 4282
lconwaymacOS 12.5.1 Montereyx86_644.2.3 (2023-03-15) -- "Shortstop Beagle" 4310
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

CHECK results for omicsViewer on nebbiolo2


To the developers/maintainers of the omicsViewer package:
- Please allow up to 24 hours (and sometimes 48 hours) for your latest push to git@git.bioconductor.org:packages/omicsViewer.git to
reflect on this report. See How and When does the builder pull? When will my changes propagate? for more information.
- Make sure to use the following settings in order to reproduce any error or warning you see on this page.

raw results

Package 1391/2183HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
omicsViewer 1.2.0  (landing page)
Chen Meng
Snapshot Date: 2023-04-10 14:00:05 -0400 (Mon, 10 Apr 2023)
git_url: https://git.bioconductor.org/packages/omicsViewer
git_branch: RELEASE_3_16
git_last_commit: 6ba4f96
git_last_commit_date: 2022-11-01 11:27:00 -0400 (Tue, 01 Nov 2022)
nebbiolo2Linux (Ubuntu 20.04.5 LTS) / x86_64  OK    OK    OK  UNNEEDED, same version is already published
palomino4Windows Server 2022 Datacenter / x64  OK    OK    OK    OK  UNNEEDED, same version is already published
lconwaymacOS 12.5.1 Monterey / x86_64  OK    OK    OK    OK  UNNEEDED, same version is already published

Summary

Package: omicsViewer
Version: 1.2.0
Command: /home/biocbuild/bbs-3.16-bioc/R/bin/R CMD check --install=check:omicsViewer.install-out.txt --library=/home/biocbuild/bbs-3.16-bioc/R/site-library --timings omicsViewer_1.2.0.tar.gz
StartedAt: 2023-04-10 22:27:53 -0400 (Mon, 10 Apr 2023)
EndedAt: 2023-04-10 22:33:43 -0400 (Mon, 10 Apr 2023)
EllapsedTime: 349.6 seconds
RetCode: 0
Status:   OK  
CheckDir: omicsViewer.Rcheck
Warnings: 0

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.16-bioc/R/bin/R CMD check --install=check:omicsViewer.install-out.txt --library=/home/biocbuild/bbs-3.16-bioc/R/site-library --timings omicsViewer_1.2.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.16-bioc/meat/omicsViewer.Rcheck’
* using R version 4.2.3 (2023-03-15)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘omicsViewer/DESCRIPTION’ ... OK
* this is package ‘omicsViewer’ version ‘1.2.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.9Mb
* 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 loading without being on the library search path ... 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
getAutoRIF 0.055  0.004    60.2
* 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 ...
  ‘quickStart.rmd’ using ‘UTF-8’... OK
 NONE
* checking re-building of vignette outputs ... OK
* checking PDF version of manual ... OK
* DONE

Status: 1 NOTE
See
  ‘/home/biocbuild/bbs-3.16-bioc/meat/omicsViewer.Rcheck/00check.log’
for details.



Installation output

omicsViewer.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.16-bioc/R/bin/R CMD INSTALL omicsViewer
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/bbs-3.16-bioc/R/site-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.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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 
  7.879   0.454   8.322 
# Looks like you passed all 14 tests.

omicsViewer.Rcheck/tests/test_db_vs_esv.Rout


R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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) : '/home/biocbuild/.cache/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 
 10.900   0.486  11.424 
# Looks like you passed all 13 tests.

omicsViewer.Rcheck/tests/test_motif.Rout


R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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 
  7.556   0.371   7.914 
# Looks like you passed all 6 tests.

omicsViewer.Rcheck/tests/test_ora.Rout


R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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 
  9.133   0.535   9.653 
# Looks like you passed all 23 tests.

omicsViewer.Rcheck/tests/test_shinyAuxi.Rout


R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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.518   0.503  10.254 
# Looks like you passed all 10 tests.

omicsViewer.Rcheck/tests/test_stats.Rout


R version 4.2.3 (2023-03-15) -- "Shortstop Beagle"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (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 
 22.215   1.098  24.181 
# Looks like you passed all 7 tests.

Example timings

omicsViewer.Rcheck/omicsViewer-Ex.timings

nameusersystemelapsed
app_module000
app_ui000
correlationAnalysis0.0130.0080.022
exprspca0.1980.0040.202
extendMetaData0.1840.0040.188
fgsea1000
fillNA0.0020.0000.002
filterRow0.0010.0000.002
getAutoRIF 0.055 0.00460.200
gsAnnotIdList0.0200.0160.036
hclust2str000
multi.t.test3.2800.5283.808
nColors0.0000.0030.003
normalize.nQuantiles0.0580.0050.062
normalize.totsum0.0130.0000.013
normalizeColWise0.0380.0000.038
normalizeData0.0350.0040.039
omicsViewer0.0000.0000.001
plotly_boxplot_module0.0010.0000.001
plotly_boxplot_ui0.0010.0000.001
plotly_scatter_module0.0030.0000.003
plotly_scatter_ui0.0030.0000.003
prepOmicsViewer2.3370.1442.482
readESVObj0.8560.1521.008
read_gmt0.6430.0080.652
removeVarQC0.0180.0000.019
rowshift0.0110.0040.015
saveOmicsViewerDb0.0920.0000.093
triselector_module0.0010.0000.001
triselector_ui0.0010.0000.001