https://github.com/ctlab/phantasus
Raw File
Tip revision: 86a00a4283730af08ece8128e9cc940845d0222d authored by Nitesh Turaga on 02 May 2019, 15:54:11 UTC
bump x.y.z versions to even y prior to creation of RELEASE_3_9 branch
Tip revision: 86a00a4
testpcaPlot.R
context("PCA Plot")

test_that("pcaPlot finishes with result", {
  load(file = system.file("testdata/GSE27112-GPL6103.rda", package="phantasus"))
  expect_is(calcPCA(es), "json")
})

test_that("pcaPlot results in columnsXcolumns matrix", {
  load(file = system.file("testdata/GSE27112-GPL6103.rda", package="phantasus"))
  expect_equal(nrow(jsonlite::fromJSON(calcPCA(es))$pca),
                length(sampleNames(es)))
})

test_that("pcaPlot drops NA rows", {
    es <- read.gct(system.file("testdata/centers.gct", package="phantasus"))
    pca <- jsonlite::fromJSON(calcPCA(es))
    expect_equal(nrow(exprs(es)), 6)
    expect_equal(nrow(pca$pca), 5)
})
back to top