Running ‘testthat.R’ [13s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ICAMS)
  > 
  > test_check("ICAMS")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  ICAMS
   --- call from context --- 
  `[.DBS144Catalog`(out.catalog, rows, )
   --- call from argument --- 
  if (class(y) %in% c("integer", "numeric")) {
      return(y)
  } else {
      class(y) <- class(x)
      for (at in c("ref.genome", "catalog.type", "abundance", "region")) {
          attr(y, at) <- attr(x, at, exact = TRUE)
      }
      return(y)
  }
   --- R stacktrace ---
  where 1: `[.DBS144Catalog`(out.catalog, rows, )
  where 2: out.catalog[rows, ]
  where 3 at testthat/test_0TransformCatalogDBS144.R#10: TransformCatalog(cat.t, target.ref.genome = "GRCh37", target.region = "exome", 
      target.catalog.type = "counts")
  where 4: eval(code, test_env)
  where 5: eval(code, test_env)
  where 6: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 7: doTryCatch(return(expr), name, parentenv, handler)
  where 8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 10: doTryCatch(return(expr), name, parentenv, handler)
  where 11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 12: tryCatchList(expr, classes, parentenv, handlers)
  where 13: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 14: test_code(desc, code, env = parent.frame())
  where 15 at testthat/test_0TransformCatalogDBS144.R#3: test_that("Transformation of a DBS 144 catalog", {
      skip_if("" == system.file(package = "BSgenome.Hsapiens.1000genomes.hs37d5"))
      stopifnot(requireNamespace("BSgenome.Hsapiens.1000genomes.hs37d5"))
      cat.t <- ReadCatalog("testdata/regress.cat.dbs.144.csv", 
          ref.genome = "GRCh37", region = "transcript", catalog.type = "counts")
      x1 <- TransformCatalog(cat.t, target.ref.genome = "GRCh37", 
          target.region = "exome", target.catalog.type = "counts")
      x2 <- TransformCatalog(x1, target.ref.genome = "GRCh37", 
          target.region = "transcript", target.catalog.type = "counts")
      expect_equal(cat.t, x2)
      cat.density <- TransformCatalog(cat.t, target.ref.genome = "GRCh37", 
          target.region = "transcript", target.catalog.type = "density")
      x3 <- TransformCatalog(x1, target.ref.genome = "GRCh37", 
          target.region = "exome", target.catalog.type = "density")
      null.cat.density <- cat.density
      attr(null.cat.density, "region") <- NULL
      null.x3 <- x3
      attr(null.x3, "region") <- NULL
      expect_equal(null.cat.density, null.x3)
      rm(null.cat.density, null.x3)
      genome.counts.signature <- TransformCatalog(cat.t, target.ref.genome = "GRCh37", 
          target.region = "transcript", target.catalog.type = "counts.signature")
      out <- rep(1, 4)
      expect_equal(sum(colSums(genome.counts.signature) == out), 
          4)
      expect_error(TransformCatalog(genome.counts.signature, target.ref.genome = "GRCh37", 
          target.region = "transcript", target.catalog.type = "density"))
      x4 <- TransformCatalog(genome.counts.signature, target.ref.genome = "GRCh37", 
          target.region = "transcript", target.catalog.type = "density.signature")
      x5 <- TransformCatalog(cat.density, target.ref.genome = "GRCh37", 
          target.region = "transcript", target.catalog.type = "density.signature")
      expect_equal(x4, x5)
  })
  where 16: eval(code, test_env)
  where 17: eval(code, test_env)
  where 18: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 19: doTryCatch(return(expr), name, parentenv, handler)
  where 20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 21: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 22: doTryCatch(return(expr), name, parentenv, handler)
  where 23: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 24: tryCatchList(expr, classes, parentenv, handlers)
  where 25: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 26: test_code(NULL, exprs, env)
  where 27: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 28: force(code)
  where 29: doWithOneRestart(return(expr), restart)
  where 30: withOneRestart(expr, restarts[[1L]])
  where 31: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 32: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 33: FUN(X[[i]], ...)
  where 34: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 35: force(code)
  where 36: doWithOneRestart(return(expr), restart)
  where 37: withOneRestart(expr, restarts[[1L]])
  where 38: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 39: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 40: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 41: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 42: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 43: test_check("ICAMS")
  
   --- value of length: 2 type: logical ---
  [1] FALSE FALSE
   --- function from context --- 
  function (x, i, j, drop = if (missing(i)) TRUE else length(cols) == 
      1) 
  {
      y <- NextMethod("[")
      if (class(y) %in% c("integer", "numeric")) {
          return(y)
      }
      else {
          class(y) <- class(x)
          for (at in c("ref.genome", "catalog.type", "abundance", 
              "region")) {
              attr(y, at) <- attr(x, at, exact = TRUE)
          }
          return(y)
      }
  }
  <bytecode: 0x56032c4dccf0>
  <environment: namespace:ICAMS>
   --- function search by body ---
  Function [.DBS144Catalog in namespace ICAMS has this body.
   ----------- END OF FAILURE REPORT -------------- 
  Fatal error: the condition has length > 1