Back to Multiple platform build/check report for BioC 3.11
ABCDEFGHIJKLMNOPQ[R]STUVWXYZ

CHECK report for Roleswitch on malbec2

This page was generated on 2020-10-17 11:55:37 -0400 (Sat, 17 Oct 2020).

TO THE DEVELOPERS/MAINTAINERS OF THE Roleswitch PACKAGE: Please make sure to use the following settings in order to reproduce any error or warning you see on this page.
Package 1523/1905HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
Roleswitch 1.26.0
Yue Li
Snapshot Date: 2020-10-16 14:40:19 -0400 (Fri, 16 Oct 2020)
URL: https://git.bioconductor.org/packages/Roleswitch
Branch: RELEASE_3_11
Last Commit: d061b9e
Last Changed Date: 2020-04-27 14:36:16 -0400 (Mon, 27 Apr 2020)
malbec2 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK [ ERROR ]
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK  ERROR  OK 
machv2 macOS 10.14.6 Mojave / x86_64  OK  OK  ERROR  OK 

Summary

Package: Roleswitch
Version: 1.26.0
Command: /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD check --install=check:Roleswitch.install-out.txt --library=/home/biocbuild/bbs-3.11-bioc/R/library --no-vignettes --timings Roleswitch_1.26.0.tar.gz
StartedAt: 2020-10-17 04:57:41 -0400 (Sat, 17 Oct 2020)
EndedAt: 2020-10-17 05:00:36 -0400 (Sat, 17 Oct 2020)
EllapsedTime: 175.8 seconds
RetCode: 1
Status:  ERROR 
CheckDir: Roleswitch.Rcheck
Warnings: NA

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD check --install=check:Roleswitch.install-out.txt --library=/home/biocbuild/bbs-3.11-bioc/R/library --no-vignettes --timings Roleswitch_1.26.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/home/biocbuild/bbs-3.11-bioc/meat/Roleswitch.Rcheck’
* using R version 4.0.3 (2020-10-10)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘Roleswitch/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘Roleswitch’ version ‘1.26.0’
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Depends: includes the non-default packages:
  'pracma', 'reshape', 'plotrix', 'microRNA', 'biomaRt', 'Biostrings',
  'Biobase', 'DBI'
Adding so many packages to the search path is excessive and importing
selectively is preferable.
* 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 ‘Roleswitch’ can be installed ... OK
* checking installed package size ... OK
* 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 ... NOTE
diagnosticPlot: no visible global function definition for ‘par’
diagnosticPlot: no visible global function definition for ‘axis’
getSeedMatrix: no visible global function definition for ‘data’
getTranscriptIDwithLongest3UTR: no visible global function definition
  for ‘aggregate’
roleswitch: no visible global function definition for ‘aggregate’
Undefined global functions or variables:
  aggregate axis data par
Consider adding
  importFrom("graphics", "axis", "par")
  importFrom("stats", "aggregate")
  importFrom("utils", "data")
to your NAMESPACE file.
* 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 contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... ERROR
Running examples in ‘Roleswitch-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: diagnosticPlot
> ### Title: Create diagnostic plot for understanding the Roleswitch model
> ###   outputs.
> ### Aliases: diagnosticPlot
> ### Keywords: plot
> 
> ### ** Examples
> 
> x.o <- matrix(abs(rnorm(10, mean=3)), 
+   dimnames=list(c(1:10),"mRNA")) # mRNA expression
>   
> z.o <- matrix(abs(rnorm(4, mean=3)),
+   dimnames=list(c(1:4),"miRNA"))  # miRNA expression
>   
> c <- matrix(rpois(40, lambda=3),nrow=nrow(x.o), 
+   dimnames=list(c(1:10),c(1:4))) # seed match matrix
> 
> rs.pred <- roleswitch(x.o, z.o, c)
 ----------- FAILURE REPORT -------------- 
 --- failure: length > 1 in coercion to logical ---
 --- srcref --- 
: 
 --- package (from environment) --- 
Roleswitch
 --- call from context --- 
roleswitch(x.o, z.o, c)
 --- call from argument --- 
class(x.o) == "eSet" || class(x.o) == "ExpressionSet"
 --- R stacktrace ---
where 1: roleswitch(x.o, z.o, c)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x.o, z.o, c, maxiter = 200, tol = 1e-05, eta.z = 0.001, 
    expected.total = 1.3, verbose = TRUE, annotation.db, probe2genesymbol = TRUE, 
    ...) 
{
    if (class(x.o) == "eSet" || class(x.o) == "ExpressionSet") {
        genes <- featureNames(x.o)
        if (probe2genesymbol) {
            if (missing(annotation.db) & is.null(annotation(x.o))) 
                stop("annotation.db or annotation is needed to map probe to gene id")
            if (missing(annotation.db) & !is.null(annotation(x.o))) 
                annotation.db <- sprintf("%s.db", annotation(x.o))
            if (is.null(featureNames(x.o))) 
                stop("featureNames is missing in the eSet/ExpressionSet to map probe id to gene id")
            require(annotation.db, character.only = TRUE) || 
                stop(sprintf("%s package must be installed", 
                  annotation.db))
            probeID <- genes
            con_comm <- paste(as.character(strsplit(annotation.db, 
                split = ".db")), "dbconn", sep = "_")
            usedDB <- eval(as.name(con_comm))
            con <- usedDB()
            annot.s <- dbReadTable(con, "gene_info")
            annot.e <- dbReadTable(con, "genes")
            annot <- merge(merge(annot.s, annot.e), dbReadTable(con, 
                "probes"))
            genes <- annot[match(probeID, annot$probe_id), "symbol"]
        }
        if (ncol(x.o) > 1) 
            warning("mRNA expression matrix has >1 column. Only first column is used.")
        x.o <- exprs(x.o)[, 1, drop = F]
        if (any(duplicated(genes))) {
            message("Average probe values were taken over the same gene.")
            df <- aggregate(data.frame(expr = as.numeric(x.o)), 
                list(genes = genes), mean)
            x.o <- as.matrix(df$expr)
            rownames(x.o) <- as.matrix(df$genes)
        }
        else {
            rownames(x.o) <- as.matrix(genes)
        }
        x.o <- x.o[!is.na(rownames(x.o)), , drop = F]
    }
    if (ncol(z.o) > 1) {
        warning("miRNA expression matrix has >1 column. Only first column is used.")
        z.o <- z.o[, 1, drop = F]
    }
    if (missing(c)) {
        c <- getSeedMatrix(convert2genesymbol = TRUE, ...)
    }
    else {
        stopifnot(all(dim(c) == c(nrow(x.o), nrow(z.o))))
        stopifnot(all(sort(rownames(c)) == sort(rownames(x.o))))
        stopifnot(all(sort(colnames(c)) == sort(rownames(z.o))))
    }
    stopifnot(!is.null(rownames(x.o)) & !is.null(rownames(z.o)) & 
        !is.null(dimnames(c)))
    if (ncol(x.o) > 1) 
        warning("mRNA expression matrix has >1 column. Only first column is used.")
    x.o <- x.o[, 1, drop = F]
    if (any(x.o < 0)) {
        message("Negative values detected in mRNA expression are set to 0")
        x.o[x.o < 0] <- 0
    }
    if (any(z.o < 0)) {
        message("Negative values detected in miRNA expression are set to 0")
        z.o[z.o < 0] <- 0
    }
    if (any(duplicated(rownames(z.o)))) {
        message("Average values were taken over the same miRNA.")
        df <- aggregate(data.frame(expr = as.numeric(z.o)), list(mirna = rownames(z.o)), 
            mean)
        z.o <- as.matrix(df$expr)
        rownames(z.o) <- as.matrix(df$mirna)
    }
    x.o0 <- x.o
    z.o0 <- z.o
    genes <- rownames(x.o)
    mirna <- rownames(z.o)
    c0 <- c[match(rownames(x.o), rownames(c)), match(rownames(z.o), 
        colnames(c))]
    dimnames(c0) <- list(rownames(x.o), rownames(z.o))
    c0[is.na(c0)] <- 0
    c <- c0
    rowidx <- which(apply(c, 1, sum) > 0)
    colidx <- which(apply(c, 2, sum) > 0)
    c <- c[rowidx, colidx]
    x.o <- x.o[rowidx, , drop = F]
    z.o <- z.o[colidx, , drop = F]
    x.t <- x.o
    z.t <- z.o
    x.total <- expected.total * sum(x.o)
    t <- 1
    converged <- FALSE
    p.x.prev <- matrix(0, nrow(x.o), nrow(z.o))
    p.z.prev <- matrix(0, nrow(x.o), nrow(z.o))
    delta.p.all <- 1
    if (verbose) 
        message(sprintf("\nStart roleswitch with %s miRNA and %s mRNA", 
            nrow(z.o), nrow(x.o)))
    while (t < maxiter & !converged) {
        t <- t + 1
        ex.total <- matrix(rep(t(c) %*% x.t, nrow(x.t)), nrow(x.t), 
            byrow = T)
        ex <- c * matrix(rep(x.t, nrow(z.t)), ncol = nrow(z.t))
        rex <- ex.total - ex
        p.x <- 1 - exp(matrix(rep(z.t, nrow(x.t)), ncol = nrow(z.t), 
            byrow = T) * (log(rex) - log(ex.total)))
        p.x[is.infinite(p.x) | is.nan(p.x)] <- 0
        x.d <- matrix(rep(x.t, nrow(z.t)), ncol = nrow(z.t)) * 
            p.x * eta.z
        x.t <- x.o + apply(x.d, 1, sum)
        x.t <- (x.t * x.total)/sum(x.t)
        ez.total <- matrix(rep(c %*% z.t, nrow(z.t)), ncol = nrow(z.t))
        ez <- c * matrix(rep(t(z.t), nrow(x.t)), nrow = nrow(x.t), 
            byrow = T)
        rez <- ez.total - ez
        p.z <- 1 - exp(matrix(rep(x.t, nrow(z.t)), ncol = nrow(z.t)) * 
            (log(rez) - log(ez.total)))
        p.z[is.infinite(p.z) | is.nan(p.z)] <- 0
        if (verbose & t > 1) 
            message(sprintf("%d: max(p.x-p.x.prev)=%.5f", t - 
                1, max(abs(p.x - p.x.prev))))
        delta.p <- max(abs(p.x - p.x.prev))
        delta.p2 <- max(abs(p.z - p.z.prev))
        delta.p.all <- c(delta.p.all, delta.p)
        if (delta.p < tol & delta.p2 < tol) {
            converged <- T
        }
        else {
            p.x.prev <- p.x
            p.z.prev <- p.z
        }
    }
    if (!identical(rownames(p.x), genes) || !identical(colnames(p.x), 
        mirna)) {
        if (verbose) 
            message("Some genes or miRNA are left out in calculation\nb/c they have zero target sites or targets!\nTheir probabilities are set to zero in the output matrices")
        p.x <- p.x[match(genes, rownames(p.x)), match(mirna, 
            colnames(p.x))]
        p.z <- p.z[match(genes, rownames(p.z)), match(mirna, 
            colnames(p.z))]
        p.x[is.na(p.x)] <- 0
        p.z[is.na(p.z)] <- 0
        dimnames(p.x) <- dimnames(c0)
        dimnames(p.z) <- dimnames(c0)
        x.t <- x.t[match(genes, rownames(x.t)), , drop = F]
        x.t[is.na(x.t)] <- x.o[is.na(x.t)]
        rownames(x.t) <- genes
    }
    p.xz <- p.x * p.z
    promise <- list(x.t = x.t, z.t = z.o0, p.x = p.x, p.z = p.z, 
        p.xz = p.xz, c = c0, x.o = x.o0, z.o = z.o0, delta.p.all = delta.p.all[-1])
    class(promise) <- "ProMISe"
    promise
}
<bytecode: 0x5651881cd130>
<environment: namespace:Roleswitch>
 --- function search by body ---
Function roleswitch in namespace Roleswitch has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: length > 1 in coercion to logical
* 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 ERROR, 2 NOTEs
See
  ‘/home/biocbuild/bbs-3.11-bioc/meat/Roleswitch.Rcheck/00check.log’
for details.


Installation output

Roleswitch.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD INSTALL Roleswitch
###
##############################################################################
##############################################################################


* installing to library ‘/home/biocbuild/bbs-3.11-bioc/R/library’
* installing *source* package ‘Roleswitch’ ...
** using staged installation
** R
** data
** 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 (Roleswitch)

Tests output


Example timings

Roleswitch.Rcheck/Roleswitch-Ex.timings

nameusersystemelapsed
Roleswitch-package0.0010.0000.000