https://github.com/ctlab/phantasus
Tip revision: 196f3db2382e89502f3d95664a7f0bee36af7287 authored by Alexey Sergushichev on 20 July 2020, 21:37:31 UTC
version bump
version bump
Tip revision: 196f3db
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)
})