Running ‘GeneExpression_Yeast_RBrem.R’ [1s/3s]
  Running ‘test_ctl_long.R’ [1s/2s]
  Running ‘test_openmp.R’ [1s/1s]
Running the tests in ‘tests/GeneExpression_Yeast_RBrem.R’ failed.
Complete output:
  > # Analysis script for the Yeast GeneExpression
  > # Paper senior author: RBrem 20??, Published in: Plos
  > #
  > # (C) 2012 Danny Arends - GBIC - University of Groningen
  > #   - Files are distributed with the Rctl package in Rctl/tests
  > 
  > # Start by: 
  > # setwd("~/Github/Rpackages/CTLmapping/Rctl/tests")
  > 
  > library(ctl)
  Loading required package: MASS
  Loading required package: qtl
  > 
  > probeannot <- read.csv("GeneExpression_Yeast_Annotation.txt", sep="\t", header=TRUE, row.names=1)
  > cross <- read.cross("csvr", file="GeneExpression_Yeast_RBrem.csvr", geno=c("AA","AB"))
   --Read the following data:
  	 109  individuals
  	 282  markers
  	 301  phenotypes
   --Cross type: bc 
  > cross <- convert2riself(cross)
  > cross <- fill.geno(cross)                   # Fill the genotypes
  > cross <- calc.genoprob(cross)               # Calculate genotype probabilities
  > 
  > ctls  <- CTLscan.cross(cross, phenocol = c(1:5), qtl = FALSE, verbose = TRUE)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ctl
   --- call from context --- 
  CTLscan(genotypes = genotypes, phenotypes = phenotypes, ...)
   --- call from argument --- 
  if (class(phenotypes) != "matrix") {
      warning("argument 'phenotypes' is not a matrix, converting to numeric matrix using apply")
      phenotypes = apply(phenotypes, 2, as.numeric)
  }
   --- R stacktrace ---
  where 1: CTLscan(genotypes = genotypes, phenotypes = phenotypes, ...)
  where 2: CTLscan.cross(cross, phenocol = c(1:5), qtl = FALSE, verbose = TRUE)
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (genotypes, phenotypes, phenocol, nperm = 100, nthreads = 1, 
      strategy = c("Exact", "Full", "Pairwise"), parametric = FALSE, 
      adjust = TRUE, qtl = TRUE, verbose = FALSE) 
  {
      if (missing(genotypes) || is.null(genotypes)) 
          stop("argument 'genotypes' is missing, with no default")
      if (missing(phenotypes) || is.null(phenotypes)) 
          stop("argument 'phenotypes' is missing, with no default")
      if (class(phenotypes) != "matrix") {
          warning("argument 'phenotypes' is not a matrix, converting to numeric matrix using apply")
          phenotypes = apply(phenotypes, 2, as.numeric)
      }
      if (class(genotypes) != "matrix") {
          warning("argument 'genotypes' is not a matrix, converting to numeric matrix using apply")
          genotypes = apply(genotypes, 2, as.numeric)
      }
      if (missing(phenocol)) 
          phenocol <- 1:ncol(phenotypes)
      st <- proc.time()
      n.phe <- ncol(phenotypes)
      n.ind1 <- nrow(phenotypes)
      n.mar <- ncol(genotypes)
      n.ind2 <- nrow(genotypes)
      if (n.ind1 != n.ind2) {
          stop("number of individuals doesn't match between genotypes (", 
              n.ind2, ") & phenotypes (", n.ind1, ")")
      }
      if (n.phe < 2) {
          stop("argument 'phenotypes' needs at least 2 columns")
      }
      if (length(phenocol) > n.phe) {
          warning(paste0("trying to scan more phenotypes then available (", 
              length(phenocol), ">", n.phe, ")"))
          phenocol <- 1:ncol(phenotypes)
      }
      if (verbose) {
          cat("Data", n.phe, "phenotypes,", paste0(n.ind1, "/", 
              n.ind2), "individuals,", n.mar, "markers\n")
          cat("Data checks finished after:", (proc.time() - st)[3], 
              "seconds\n")
      }
      if (!parametric) {
          phenotypes <- apply(phenotypes, 2, rank)
          if (verbose) 
              cat("Data ranking finished after:", (proc.time() - 
                  st)[3], "seconds\n")
      }
      ctlobject <- vector("list", length(phenocol))
      idx <- 1
      for (phe in phenocol) {
          ctlobject[[idx]] <- CTLmapping(genotypes, phenotypes, 
              phenocol = phe, nperm = nperm, nthreads = nthreads, 
              strategy = strategy, adjust = adjust, qtl = qtl, 
              verbose = verbose)
          idx <- idx + 1
      }
      if (verbose) 
          cat("Done after:", (proc.time() - st)[3], "seconds\n")
      class(ctlobject) <- c(class(ctlobject), "CTLobject")
      invisible(ctlobject)
  }
  <bytecode: 0x5596c56c0050>
  <environment: namespace:ctl>
   --- function search by body ---
  Function CTLscan in namespace ctl has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1
Running the tests in ‘tests/test_ctl_long.R’ failed.
Complete output:
  > library(ctl)
  Loading required package: MASS
  Loading required package: qtl
  > data(ath.metabolites)
  > ctl_result <- CTLscan(ath.metab$genotypes, ath.metab$phenotypes, nperm=150)
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ctl
   --- call from context --- 
  CTLscan(ath.metab$genotypes, ath.metab$phenotypes, nperm = 150)
   --- call from argument --- 
  if (class(genotypes) != "matrix") {
      warning("argument 'genotypes' is not a matrix, converting to numeric matrix using apply")
      genotypes = apply(genotypes, 2, as.numeric)
  }
   --- R stacktrace ---
  where 1: CTLscan(ath.metab$genotypes, ath.metab$phenotypes, nperm = 150)
  
   --- value of length: 2 type: logical ---
  [1] FALSE  TRUE
   --- function from context --- 
  function (genotypes, phenotypes, phenocol, nperm = 100, nthreads = 1, 
      strategy = c("Exact", "Full", "Pairwise"), parametric = FALSE, 
      adjust = TRUE, qtl = TRUE, verbose = FALSE) 
  {
      if (missing(genotypes) || is.null(genotypes)) 
          stop("argument 'genotypes' is missing, with no default")
      if (missing(phenotypes) || is.null(phenotypes)) 
          stop("argument 'phenotypes' is missing, with no default")
      if (class(phenotypes) != "matrix") {
          warning("argument 'phenotypes' is not a matrix, converting to numeric matrix using apply")
          phenotypes = apply(phenotypes, 2, as.numeric)
      }
      if (class(genotypes) != "matrix") {
          warning("argument 'genotypes' is not a matrix, converting to numeric matrix using apply")
          genotypes = apply(genotypes, 2, as.numeric)
      }
      if (missing(phenocol)) 
          phenocol <- 1:ncol(phenotypes)
      st <- proc.time()
      n.phe <- ncol(phenotypes)
      n.ind1 <- nrow(phenotypes)
      n.mar <- ncol(genotypes)
      n.ind2 <- nrow(genotypes)
      if (n.ind1 != n.ind2) {
          stop("number of individuals doesn't match between genotypes (", 
              n.ind2, ") & phenotypes (", n.ind1, ")")
      }
      if (n.phe < 2) {
          stop("argument 'phenotypes' needs at least 2 columns")
      }
      if (length(phenocol) > n.phe) {
          warning(paste0("trying to scan more phenotypes then available (", 
              length(phenocol), ">", n.phe, ")"))
          phenocol <- 1:ncol(phenotypes)
      }
      if (verbose) {
          cat("Data", n.phe, "phenotypes,", paste0(n.ind1, "/", 
              n.ind2), "individuals,", n.mar, "markers\n")
          cat("Data checks finished after:", (proc.time() - st)[3], 
              "seconds\n")
      }
      if (!parametric) {
          phenotypes <- apply(phenotypes, 2, rank)
          if (verbose) 
              cat("Data ranking finished after:", (proc.time() - 
                  st)[3], "seconds\n")
      }
      ctlobject <- vector("list", length(phenocol))
      idx <- 1
      for (phe in phenocol) {
          ctlobject[[idx]] <- CTLmapping(genotypes, phenotypes, 
              phenocol = phe, nperm = nperm, nthreads = nthreads, 
              strategy = strategy, adjust = adjust, qtl = qtl, 
              verbose = verbose)
          idx <- idx + 1
      }
      if (verbose) 
          cat("Done after:", (proc.time() - st)[3], "seconds\n")
      class(ctlobject) <- c(class(ctlobject), "CTLobject")
      invisible(ctlobject)
  }
  <bytecode: 0x562b58740b98>
  <environment: namespace:ctl>
   --- function search by body ---
  Function CTLscan in namespace ctl has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1