Back to Multiple platform build/check report for BioC 3.11
ABCDEFGHIJKL[M]NOPQRSTUVWXYZ

CHECK report for MoPS on malbec2

This page was generated on 2020-03-12 13:47:26 -0400 (Thu, 12 Mar 2020).

Package 1089/1838HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
MoPS 1.21.0
Philipp Eser
Snapshot Date: 2020-03-11 16:45:12 -0400 (Wed, 11 Mar 2020)
URL: https://git.bioconductor.org/packages/MoPS
Branch: master
Last Commit: 93eb249
Last Changed Date: 2019-10-29 13:37:33 -0400 (Tue, 29 Oct 2019)
malbec2 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK [ ERROR ]
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK  ERROR  OK 

Summary

Package: MoPS
Version: 1.21.0
Command: /home/biocbuild/bbs-3.11-bioc/R/bin/R CMD check --install=check:MoPS.install-out.txt --library=/home/biocbuild/bbs-3.11-bioc/R/library --no-vignettes --timings MoPS_1.21.0.tar.gz
StartedAt: 2020-03-12 02:57:43 -0400 (Thu, 12 Mar 2020)
EndedAt: 2020-03-12 02:58:19 -0400 (Thu, 12 Mar 2020)
EllapsedTime: 35.5 seconds
RetCode: 1
Status:  ERROR 
CheckDir: MoPS.Rcheck
Warnings: NA

Command output

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


* using log directory ‘/home/biocbuild/bbs-3.11-bioc/meat/MoPS.Rcheck’
* using R Under development (unstable) (2020-01-28 r77731)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘MoPS/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘MoPS’ version ‘1.21.0’
* 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 ‘MoPS’ 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
fit.periodic: no visible global function definition for ‘lm’
fit.periodic: no visible global function definition for ‘cor’
fun.lognormal: no visible global function definition for ‘dlnorm’
fun.lognormal.psi: no visible global function definition for ‘dlnorm’
makewave: no visible global function definition for ‘integrate’
pathfunction: no visible global function definition for ‘approxfun’
Undefined global functions or variables:
  approxfun cor dlnorm integrate lm
Consider adding
  importFrom("stats", "approxfun", "cor", "dlnorm", "integrate", "lm")
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 ‘MoPS-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fit.periodic
> ### Title: Fitting of periodic curves to time series data
> ### Aliases: fit.periodic
> 
> ### ** Examples
> 
> 
> x = seq(0,40,by=1) # time points
> 
> ## create 10 periodic time series with added noise
> mat.p = matrix(rep(x,10),nrow=10,ncol=length(x),byrow=TRUE)
> y = -seq(1:10)
> mat.p = apply(mat.p,2,function(x){
+ 	y = sin(pi*(x/41*6)+y)+rnorm(length(x),sd=1)
+ 	})
> 
> ## add 10 non-periodic noisy time series
> mat.nonP = matrix(rep(x,10),nrow=10,ncol=length(x),byrow=TRUE)
> mat.nonP = apply(mat.nonP,2,function(x){
+ 	y = rnorm(length(x),sd=1)
+ 	})
> 	
> mat = rbind(mat.p,mat.nonP)
> 
> res = fit.periodic(mat,phi=seq(0,20,1),lambda=seq(1,20,1))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
MoPS
 --- call from context --- 
fit.periodic(mat, phi = seq(0, 20, 1), lambda = seq(1, 20, 1))
 --- call from argument --- 
if (class(mat) == "ExpressionSet") {
    mat = exprs(mat)
}
 --- R stacktrace ---
where 1: fit.periodic(mat, phi = seq(0, 20, 1), lambda = seq(1, 20, 1))

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (mat, timepoints = NULL, phi = NULL, lambda = NULL, 
    sigma = NULL, psi = NULL, weights = NULL) 
{
    if (class(mat) == "ExpressionSet") {
        mat = exprs(mat)
    }
    if (!is.null(weights)) {
        if (!length(mat) == length(weights)) {
            stop("Error: wrong dimension of weights matrix")
        }
        if (is.null(rownames(mat)) | is.null(rownames(weights)) | 
            !rownames(mat) == rownames(weights)) {
            message("Warning: rownames of weight matrix not equal to rownames of data matrix.")
            message("replacing rownames of both matrices with ID_1,ID_2 ... ID_n")
            rownames(mat) = paste("ID", 1:dim(mat)[1], sep = "_")
            rownames(weights) = paste("ID", 1:dim(weights)[1], 
                sep = "_")
        }
    }
    if (is.null(dim(mat))) {
        mat = matrix(mat, nrow = 1)
    }
    if (is.null(rownames(mat))) {
        rownames(mat) = paste("ID", 1:dim(mat)[1], sep = "_")
    }
    if (is.null(timepoints)) {
        timepoints = 1:ncol(mat)
    }
    if (is.null(phi)) {
        phi = timepoints
        n.phigrid = length(phi)
    }
    if (is.null(lambda)) {
        lambda = timepoints
        n.lambdagrid = length(lambda)
    }
    if (is.null(sigma)) {
        sigma = 0
        n.sigmagrid = length(sigma)
    }
    if (!is.null(psi)) {
        n.unitgrid = psi + 1
        unitgrid = seq(from = 0, to = 2 * pi, length = n.unitgrid + 
            1)
        psigrid = matrix(unitgrid, nrow = 1)
        for (j in 1:(psi - 1)) {
            hilf = apply(psigrid, 2, extend, unitgrid)
            hilf = unlist(hilf)
            psigrid = matrix(hilf, nrow = j + 1)
        }
        n.psigrid = ncol(psigrid)
    }
    lower.standard = timepoints[1]
    if (lower.standard == 0) 
        lower.standard = 1
    upper.standard = timepoints[length(timepoints) - 1]
    testfunmat.nonPeriodic = createLinearTimeCourses(timepoints)
    if (is.null(psi)) {
        Glist = list()
        for (s in sigma) {
            for (l in lambda) {
                phi.l = phi[phi <= l]
                for (p in phi.l) {
                  Glist[[length(Glist) + 1]] = list(phi = p, 
                    psi = NULL, lambda = l, sigma = s)
                }
            }
        }
    }
    else {
        Glist = list()
        for (s in sigma) {
            for (l in lambda) {
                phi.l = phi[phi <= l]
                for (p in phi.l) {
                  for (ps in 1:ncol(psigrid)) {
                    Glist[[length(Glist) + 1]] = list(phi = p, 
                      psi = psigrid[, ps], lambda = l, sigma = s)
                  }
                }
            }
        }
    }
    nFunctions = length(Glist)
    tests = nFunctions * dim(mat)[1]
    vec = mat[1, ]
    if (nFunctions > 1000 & tests > 10000) {
        message("Estimating time required to do the analysis .... ")
        testfmatrix = list()
        if (is.null(psi)) {
            t1 = system.time((for (x in 1:1000) {
                testfmatrix[[length(testfmatrix) + 1]] = makewave(Glist[[x]], 
                  timepoints, lower = lower.standard, upper = upper.standard, 
                  fun = fun.lognormal)
            }))
            t = t1[[1]] * nFunctions/1000
        }
        else {
            t1 = system.time((for (x in 1:100) {
                testfmatrix[[length(testfmatrix) + 1]] = makewave(Glist[[x]], 
                  timepoints, lower = lower.standard, upper = upper.standard, 
                  fun = fun.lognormal.psi, psi = Glist[[x]]$psi)
            }))
            t = t1[[1]] * nFunctions/100
        }
        t2 = system.time((for (x in 1:10000) {
            lm(vec ~ testfmatrix[[1]])
        }))
        cost = (t + t2[[1]] * tests/10000)/60
        message(paste(tests, "linear regressions will be performed. This will take approx.", 
            round(cost, 1), "minutes."))
        if (cost > 30) {
            message("See the MoPS vignette for help on speeding things up.")
        }
    }
    else {
        message(paste(tests, "linear regressions will be performed. This will take < 5 minutes."))
    }
    testfmatrix = list()
    message("Creating test functions ....")
    message("0 %")
    percent = 10
    if (!is.null(psi)) {
        for (i in 1:length(Glist)) {
            p = round(i/length(Glist) * 100, 0)
            if (p >= percent) {
                message(paste(p, "%"))
                percent = percent + 10
            }
            testfmatrix[[length(testfmatrix) + 1]] = makewave(Glist[[i]], 
                timepoints, lower = lower.standard, upper = upper.standard, 
                fun = fun.lognormal.psi, psi = Glist[[i]]$psi)
        }
    }
    else {
        for (i in 1:length(Glist)) {
            p = round(i/length(Glist) * 100, 0)
            if (p >= percent) {
                message(paste(p, "%"))
                percent = percent + 10
            }
            testfmatrix[[length(testfmatrix) + 1]] = makewave(Glist[[i]], 
                timepoints, lower = lower.standard, upper = upper.standard, 
                fun = fun.lognormal)
        }
    }
    ids = rownames(mat)
    n = length(ids)
    resultList = list()
    message("Fitting of test functions to data ....")
    message("0 %")
    percent = 10
    for (i in 1:n) {
        p = round(i/n * 100, 0)
        if (p >= percent) {
            message(paste(p, "%"))
            percent = percent + 10
        }
        vec = mat[i, ]
        all.losses = rep(NA, length(testfmatrix))
        for (j in 1:length(testfmatrix)) {
            if (is.null(weights)) {
                linmod = lm(vec ~ testfmatrix[[j]])
            }
            else {
                w = weights[i, ]
                linmod = lm(vec ~ testfmatrix[[j]], weights = w)
            }
            loss = sum(linmod$residuals^2)
            R = cor(vec, testfmatrix[[j]], use = "pairwise.complete.obs")
            if (R < 0 | is.na(R)) {
                loss = Inf
            }
            all.losses[j] = loss
        }
        minPos.periodic = which.min(all.losses)
        loss.periodic = all.losses[minPos.periodic]
        if (is.null(weights)) {
            linmod = lm(vec ~ testfmatrix[[minPos.periodic]])
        }
        else {
            linmod = lm(vec ~ testfmatrix[[minPos.periodic]], 
                weights = w)
        }
        a = linmod$coefficients[[2]]
        b = linmod$coefficients[[1]]
        lossL.nonPeriodic = c()
        for (j in 1:dim(testfunmat.nonPeriodic)[2]) {
            if (is.null(weights)) {
                if (sum(is.na(vec)) > 0) {
                  linmod = lm(vec ~ testfunmat.nonPeriodic[, 
                    j])
                }
                else {
                  linmod = lm(vec ~ testfunmat.nonPeriodic[, 
                    j])
                }
            }
            else {
                linmod = lm(vec ~ testfunmat.nonPeriodic[, j], 
                  weights = w)
            }
            loss = sum(linmod$residuals^2)
            lossL.nonPeriodic = c(lossL.nonPeriodic, loss)
        }
        minPos.nonPeriodic = which.min(lossL.nonPeriodic)
        loss.nonPeriodic = lossL.nonPeriodic[minPos.nonPeriodic]
        if (is.null(weights)) {
            linmod = lm(vec ~ testfunmat.nonPeriodic[, minPos.nonPeriodic])
        }
        else {
            linmod = lm(vec ~ testfunmat.nonPeriodic[, minPos.nonPeriodic], 
                weights = w)
        }
        loss.nonPeriodic = sum(linmod$residuals^2)
        is.weakly.periodic = loss.periodic <= loss.nonPeriodic
        score = log(loss.nonPeriodic/loss.periodic)
        resultList[[i]] = list(ID = ids[i], score = score, minLossPeriodic = loss.periodic, 
            minLossNonPeriodic = loss.nonPeriodic, phi = Glist[[minPos.periodic]]$phi, 
            psi = Glist[[minPos.periodic]]$psi, lambda = Glist[[minPos.periodic]]$lambda, 
            sigma = Glist[[minPos.periodic]]$sigma, a.coef = a, 
            b.coef = b)
    }
    result = list(fitted = resultList, time = timepoints, cols.mat = ncol(mat), 
        phi = phi, lambda = lambda, sigma = sigma)
    return(result)
}
<bytecode: 0x56202f13fcd0>
<environment: namespace:MoPS>
 --- function search by body ---
Function fit.periodic in namespace MoPS has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1
* 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, 1 NOTE
See
  ‘/home/biocbuild/bbs-3.11-bioc/meat/MoPS.Rcheck/00check.log’
for details.


Installation output

MoPS.Rcheck/00install.out

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


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

Tests output


Example timings

MoPS.Rcheck/MoPS-Ex.timings

nameusersystemelapsed