https://github.com/ctlab/phantasus
Tip revision: fe9c3824eb3d9649de2d0c074c8896ae13c45f27 authored by Nitesh Turaga on 27 April 2020, 19:14:57 UTC
bump x.y.z version to even y prior to creation of RELEASE_3_11 branch
bump x.y.z version to even y prior to creation of RELEASE_3_11 branch
Tip revision: fe9c382
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)
})