tests/testthat/test_SubsetPathwayData.R

context("SubsetPathwayData")

data("colonSurv_df")
data("colon_pathwayCollection")

colon_OmicsSurv <- CreateOmics(
  assayData_df = colonSurv_df[, -c(2:3)],
  pathwayCollection_ls = colon_pathwayCollection,
  response = colonSurv_df[, 1:3],
  respType = "s"
)

test_that("SubsetPathwayData gives correct errors", {
  
    expect_error(
    SubsetPathwayData(
      colon_OmicsSurv,
      "haha"
    ), "Pathway not found."
  )
  
})

test_that("SubsetPathwayData returns df with correct classes", {
  
  expect_s3_class(
    SubsetPathwayData(
      colon_OmicsSurv,
      "KEGG_RETINOL_METABOLISM"
    ), c("tbl_df", "tbl", "data.frame")
  )
  
})

Try the pathwayPCA package in your browser

Any scripts or data that you put into this service are public.

pathwayPCA documentation built on Dec. 15, 2020, 6:14 p.m.