CRAN Package Check Results for Package SKAT

Last updated on 2020-01-27 00:48:23 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.3.2.1 25.26 59.94 85.20 ERROR
r-devel-linux-x86_64-debian-gcc 1.3.2.1 17.09 97.23 114.32 OK
r-devel-linux-x86_64-fedora-clang 1.3.2.1 199.93 OK
r-devel-linux-x86_64-fedora-gcc 1.3.2.1 183.31 OK
r-devel-windows-ix86+x86_64 1.3.2.1 72.00 216.00 288.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.3.2.1 52.00 183.00 235.00 OK
r-patched-linux-x86_64 1.3.2.1 20.32 122.21 142.53 OK
r-patched-solaris-x86 1.3.2.1 355.40 OK
r-release-linux-x86_64 1.3.2.1 19.72 119.71 139.43 OK
r-release-windows-ix86+x86_64 1.3.2.1 55.00 198.00 253.00 OK
r-release-osx-x86_64 1.3.2.1 OK
r-oldrel-windows-ix86+x86_64 1.3.2.1 42.00 153.00 195.00 OK
r-oldrel-osx-x86_64 1.3.2.1 OK

Check Details

Version: 1.3.2.1
Check: examples
Result: ERROR
    Running examples in 'SKAT-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: Get_Logistic_Weights
    > ### Title: Get the logistic weight
    > ### Aliases: Get_Logistic_Weights Get_Logistic_Weights_MAF
    >
    > ### ** Examples
    >
    >
    >
    > data(SKAT.example)
    > attach(SKAT.example)
    >
    >
    > #############################################################
    > # Compute the P-value of SKAT with the logistic Weight (par1=0.07, par2=150)
    >
    > # Use logistic weight
    > obj<-SKAT_Null_Model(y.c ~ X, out_type="C")
    > weights<-Get_Logistic_Weights(Z, par1=0.07, par2=150)
    > SKAT(Z, obj, kernel = "linear.weighted", weights=weights)$p.value
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SKAT
     --- call from context ---
    SKAT_MAIN_Check_Z(Z, obj.res$n.all, obj.res$id_include, SetID,
     weights, weights.beta, impute.method, is_check_genotype,
     is_dosage, missing_cutoff, max_maf = max_maf, estimate_MAF = estimate_MAF)
     --- call from argument ---
    if (class(Z) != "matrix") stop("Z is not a matrix")
     --- R stacktrace ---
    where 1: SKAT_MAIN_Check_Z(Z, obj.res$n.all, obj.res$id_include, SetID,
     weights, weights.beta, impute.method, is_check_genotype,
     is_dosage, missing_cutoff, max_maf = max_maf, estimate_MAF = estimate_MAF)
    where 2: SKAT_With_NullModel(Z, obj, kernel = kernel, method = method,
     weights.beta = weights.beta, weights = weights, impute.method = impute.method,
     r.corr = r.corr, is_check_genotype = is_check_genotype, is_dosage = is_dosage,
     missing_cutoff = missing_cutoff, max_maf = max_maf, estimate_MAF = estimate_MAF)
    where 3: SKAT(Z, obj, kernel = "linear.weighted", weights = weights)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (Z, n, id_include, SetID, weights, weights.beta, impute.method,
     is_check_genotype, is_dosage, missing_cutoff, max_maf, estimate_MAF = 1,
     Is.chrX = FALSE, SexVar = NULL)
    {
     if (class(Z) != "matrix")
     stop("Z is not a matrix")
     if (nrow(Z) != n)
     stop("Dimensions of y and Z do not match")
     if (is_dosage == TRUE) {
     impute.method = "fixed"
     }
     if (!is_check_genotype && !is_dosage) {
     Z.test <- Z[id_include, ]
     if (!is.matrix(Z.test)) {
     Z.test <- as.matrix(Z.test)
     }
     return(list(Z.test = Z.test, weights = weights, MAF = rep(0,
     ncol(Z)), return = 0))
     }
     if (estimate_MAF == 2) {
     Z <- cbind(Z[id_include, ])
     id_include <- 1:length(id_include)
     }
     IDX_MISS <- union(which(is.na(Z)), which(Z == 9))
     if (length(IDX_MISS) > 0) {
     Z[IDX_MISS] <- NA
     }
     m = ncol(Z)
     ID_INCLUDE_SNP <- NULL
     MAF_toCutoff <- SKAT_Get_MAF(Z, id_include = NULL, Is.chrX = Is.chrX,
     SexVar = SexVar)
     for (i in 1:m) {
     missing.ratio <- length(which(is.na(Z[, i])))/n
     sd1 <- sd(Z[, i], na.rm = TRUE)
     if (missing.ratio < missing_cutoff && sd1 > 0) {
     if (MAF_toCutoff[i] < max_maf) {
     ID_INCLUDE_SNP <- c(ID_INCLUDE_SNP, i)
     }
     }
     }
     if (length(ID_INCLUDE_SNP) == 0) {
     if (is.null(SetID)) {
     msg <- sprintf("ALL SNPs have either high missing rates or no-variation. P-value=1")
     }
     else {
     msg <- sprintf("In %s, ALL SNPs have either high missing rates or no-variation. P-value=1",
     SetID)
     }
     warning(msg, call. = FALSE)
     re <- list(p.value = 1, p.value.resampling = NA, Test.Type = NA,
     Q = NA, param = list(n.marker = 0, n.marker.test = 0),
     return = 1)
     return(re)
     }
     else if (m - length(ID_INCLUDE_SNP) > 0) {
     if (is.null(SetID)) {
     msg <- sprintf("%d SNPs with either high missing rates or no-variation are excluded!",
     m - length(ID_INCLUDE_SNP))
     }
     else {
     msg <- sprintf("In %s, %d SNPs with either high missing rates or no-variation are excluded!",
     SetID, m - length(ID_INCLUDE_SNP))
     }
     warning(msg, call. = FALSE)
     Z <- as.matrix(Z[, ID_INCLUDE_SNP])
     }
     MAF_Org <- SKAT_Get_MAF(Z, id_include = NULL, Is.chrX = Is.chrX,
     SexVar = SexVar)
     Z <- SKAT_MAIN_Check_Z_Impute(Z, id_include, impute.method,
     SetID, Is.chrX, SexVar)
     MAF <- SKAT_Get_MAF(Z, id_include = NULL, Is.chrX = Is.chrX,
     SexVar = SexVar)
     MAF1 <- SKAT_Get_MAF(Z, id_include = id_include, Is.chrX = Is.chrX,
     SexVar = SexVar)
     if (length(which(MAF1 > 0)) == 0) {
     if (is.null(SetID)) {
     msg <- sprintf("No polymorphic SNP. P-value = 1")
     }
     else {
     msg <- sprintf("In %s, No polymorphic SNP. P-value = 1",
     SetID)
     }
     warning(msg, call. = FALSE)
     re <- list(p.value = 1, p.value.resampling = NA, Test.Type = NA,
     Q = NA, param = list(n.marker = 0, n.marker.test = 0),
     return = 1)
     return(re)
     }
     if (is.null(weights)) {
     weights <- Beta.Weights(MAF, weights.beta)
     }
     else {
     weights = weights[ID_INCLUDE_SNP]
     }
     if (n - length(id_include) > 0) {
     id_Z <- which(MAF1 > 0)
     if (length(id_Z) == 0) {
     if (is.null(SetID)) {
     msg <- sprintf("No polymorphic SNP. P-value = 1")
     }
     else {
     msg <- sprintf("In %s, No polymorphic SNP. P-value = 1",
     SetID)
     }
     warning(msg, call. = FALSE)
     re <- list(p.value = 1, p.value.resampling = NA,
     Test.Type = NA, Q = NA, param = list(n.marker = 0,
     n.marker.test = 0), return = 1)
     }
     else if (length(id_Z) == 1) {
     Z <- cbind(Z[, id_Z])
     }
     else {
     Z <- Z[, id_Z]
     }
     if (!is.null(weights)) {
     weights <- weights[id_Z]
     }
     }
     if (dim(Z)[2] == 1) {
     if (is.null(SetID)) {
     msg <- sprintf("Only one SNP in the SNP set!")
     }
     else {
     msg <- sprintf("In %s, Only one SNP in the SNP set!",
     SetID)
     }
     Z.test <- as.matrix(Z[id_include, ])
     }
     else {
     Z.test <- Z[id_include, ]
     }
     return(list(Z.test = Z.test, weights = weights, MAF = MAF_Org,
     id_include.test = id_include, return = 0))
    }
    <bytecode: 0x3bc0078>
    <environment: namespace:SKAT>
     --- function search by body ---
    Function SKAT_MAIN_Check_Z in namespace SKAT has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(Z) != "matrix") stop("Z is not a matrix") :
     the condition has length > 1
    Calls: SKAT -> SKAT_With_NullModel -> SKAT_MAIN_Check_Z
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.3.2.1
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'SKAT.Rnw' using Sweave
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SKAT
     --- call from context ---
    SKAT_MAIN_Check_Z(Z, obj.res$n.all, obj.res$id_include, SetID,
     weights, weights.beta, impute.method, is_check_genotype,
     is_dosage, missing_cutoff, max_maf = max_maf, estimate_MAF = estimate_MAF)
     --- call from argument ---
    if (class(Z) != "matrix") stop("Z is not a matrix")
     --- R stacktrace ---
    where 1: SKAT_MAIN_Check_Z(Z, obj.res$n.all, obj.res$id_include, SetID,
     weights, weights.beta, impute.method, is_check_genotype,
     is_dosage, missing_cutoff, max_maf = max_maf, estimate_MAF = estimate_MAF)
    where 2: SKAT_With_NullModel(Z, obj, kernel = kernel, method = method,
     weights.beta = weights.beta, weights = weights, impute.method = impute.method,
     r.corr = r.corr, is_check_genotype = is_check_genotype, is_dosage = is_dosage,
     missing_cutoff = missing_cutoff, max_maf = max_maf, estimate_MAF = estimate_MAF)
    where 3: SKAT(Z, obj)
    where 4: eval(expr, .GlobalEnv)
    where 5: eval(expr, .GlobalEnv)
    where 6: withVisible(eval(expr, .GlobalEnv))
    where 7: doTryCatch(return(expr), name, parentenv, handler)
    where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 9: tryCatchList(expr, classes, parentenv, handlers)
    where 10: tryCatch(expr, error = function(e) {
     call <- conditionCall(e)
     if (!is.null(call)) {
     if (identical(call[[1L]], quote(doTryCatch)))
     call <- sys.call(-4L)
     dcall <- deparse(call)[1L]
     prefix <- paste("Error in", dcall, ": ")
     LONG <- 75L
     sm <- strsplit(conditionMessage(e), "\n")[[1L]]
     w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
     if (is.na(w))
     w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
     type = "b")
     if (w > LONG)
     prefix <- paste0(prefix, "\n ")
     }
     else prefix <- "Error : "
     msg <- paste0(prefix, conditionMessage(e), "\n")
     .Internal(seterrmessage(msg[1L]))
     if (!silent && isTRUE(getOption("show.error.messages"))) {
     cat(msg, file = outFile)
     .Internal(printDeferredWarnings())
     }
     invisible(structure(msg, class = "try-error", condition = e))
    })
    where 11: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 12: evalFunc(ce, options)
    where 13: tryCatchList(expr, classes, parentenv, handlers)
    where 14: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 15: driver$runcode(drobj, chunk, chunkopts)
    where 16: utils::Sweave(...)
    where 17: engine$weave(file, quiet = quiet, encoding = enc)
    where 18: doTryCatch(return(expr), name, parentenv, handler)
    where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 20: tryCatchList(expr, classes, parentenv, handlers)
    where 21: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 22: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/SKAT.Rcheck/vign_test/SKAT",
     ser_elibs = "/tmp/Rtmpmv5bbI/file3889233c6b53.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (Z, n, id_include, SetID, weights, weights.beta, impute.method,
     is_check_genotype, is_dosage, missing_cutoff, max_maf, estimate_MAF = 1,
     Is.chrX = FALSE, SexVar = NULL)
    {
     if (class(Z) != "matrix")
     stop("Z is not a matrix")
     if (nrow(Z) != n)
     stop("Dimensions of y and Z do not match")
     if (is_dosage == TRUE) {
     impute.method = "fixed"
     }
     if (!is_check_genotype && !is_dosage) {
     Z.test <- Z[id_include, ]
     if (!is.matrix(Z.test)) {
     Z.test <- as.matrix(Z.test)
     }
     return(list(Z.test = Z.test, weights = weights, MAF = rep(0,
     ncol(Z)), return = 0))
     }
     if (estimate_MAF == 2) {
     Z <- cbind(Z[id_include, ])
     id_include <- 1:length(id_include)
     }
     IDX_MISS <- union(which(is.na(Z)), which(Z == 9))
     if (length(IDX_MISS) > 0) {
     Z[IDX_MISS] <- NA
     }
     m = ncol(Z)
     ID_INCLUDE_SNP <- NULL
     MAF_toCutoff <- SKAT_Get_MAF(Z, id_include = NULL, Is.chrX = Is.chrX,
     SexVar = SexVar)
     for (i in 1:m) {
     missing.ratio <- length(which(is.na(Z[, i])))/n
     sd1 <- sd(Z[, i], na.rm = TRUE)
     if (missing.ratio < missing_cutoff && sd1 > 0) {
     if (MAF_toCutoff[i] < max_maf) {
     ID_INCLUDE_SNP <- c(ID_INCLUDE_SNP, i)
     }
     }
     }
     if (length(ID_INCLUDE_SNP) == 0) {
     if (is.null(SetID)) {
     msg <- sprintf("ALL SNPs have either high missing rates or no-variation. P-value=1")
     }
     else {
     msg <- sprintf("In %s, ALL SNPs have either high missing rates or no-variation. P-value=1",
     SetID)
     }
     warning(msg, call. = FALSE)
     re <- list(p.value = 1, p.value.resampling = NA, Test.Type = NA,
     Q = NA, param = list(n.marker = 0, n.marker.test = 0),
     return = 1)
     return(re)
     }
     else if (m - length(ID_INCLUDE_SNP) > 0) {
     if (is.null(SetID)) {
     msg <- sprintf("%d SNPs with either high missing rates or no-variation are excluded!",
     m - length(ID_INCLUDE_SNP))
     }
     else {
     msg <- sprintf("In %s, %d SNPs with either high missing rates or no-variation are excluded!",
     SetID, m - length(ID_INCLUDE_SNP))
     }
     warning(msg, call. = FALSE)
     Z <- as.matrix(Z[, ID_INCLUDE_SNP])
     }
     MAF_Org <- SKAT_Get_MAF(Z, id_include = NULL, Is.chrX = Is.chrX,
     SexVar = SexVar)
     Z <- SKAT_MAIN_Check_Z_Impute(Z, id_include, impute.method,
     SetID, Is.chrX, SexVar)
     MAF <- SKAT_Get_MAF(Z, id_include = NULL, Is.chrX = Is.chrX,
     SexVar = SexVar)
     MAF1 <- SKAT_Get_MAF(Z, id_include = id_include, Is.chrX = Is.chrX,
     SexVar = SexVar)
     if (length(which(MAF1 > 0)) == 0) {
     if (is.null(SetID)) {
     msg <- sprintf("No polymorphic SNP. P-value = 1")
     }
     else {
     msg <- sprintf("In %s, No polymorphic SNP. P-value = 1",
     SetID)
     }
     warning(msg, call. = FALSE)
     re <- list(p.value = 1, p.value.resampling = NA, Test.Type = NA,
     Q = NA, param = list(n.marker = 0, n.marker.test = 0),
     return = 1)
     return(re)
     }
     if (is.null(weights)) {
     weights <- Beta.Weights(MAF, weights.beta)
     }
     else {
     weights = weights[ID_INCLUDE_SNP]
     }
     if (n - length(id_include) > 0) {
     id_Z <- which(MAF1 > 0)
     if (length(id_Z) == 0) {
     if (is.null(SetID)) {
     msg <- sprintf("No polymorphic SNP. P-value = 1")
     }
     else {
     msg <- sprintf("In %s, No polymorphic SNP. P-value = 1",
     SetID)
     }
     warning(msg, call. = FALSE)
     re <- list(p.value = 1, p.value.resampling = NA,
     Test.Type = NA, Q = NA, param = list(n.marker = 0,
     n.marker.test = 0), return = 1)
     }
     else if (length(id_Z) == 1) {
     Z <- cbind(Z[, id_Z])
     }
     else {
     Z <- Z[, id_Z]
     }
     if (!is.null(weights)) {
     weights <- weights[id_Z]
     }
     }
     if (dim(Z)[2] == 1) {
     if (is.null(SetID)) {
     msg <- sprintf("Only one SNP in the SNP set!")
     }
     else {
     msg <- sprintf("In %s, Only one SNP in the SNP set!",
     SetID)
     }
     Z.test <- as.matrix(Z[id_include, ])
     }
     else {
     Z.test <- Z[id_include, ]
     }
     return(list(Z.test = Z.test, weights = weights, MAF = MAF_Org,
     id_include.test = id_include, return = 0))
    }
    <bytecode: 0x492dce8>
    <environment: namespace:SKAT>
     --- function search by body ---
    Function SKAT_MAIN_Check_Z in namespace SKAT has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'SKAT.Rnw' failed with diagnostics:
     chunk 2 (label = SKAT1)
    Error in if (class(Z) != "matrix") stop("Z is not a matrix") :
     the condition has length > 1
    
    --- failed re-building 'SKAT.Rnw'
    
    SUMMARY: processing the following file failed:
     'SKAT.Rnw'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang