Revision 0d6a5c07279c25af21abfe534b8cbb4a651042e3 authored by Alexey Sergushichev on 20 October 2018, 13:07:06 UTC, committed by Alexey Sergushichev on 20 October 2018, 13:07:06 UTC
1 parent 85f9f43
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)
})
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...