swh:1:snp:0c004a03453a29b80f921a24433f7e780b9ceb53
Raw File
Tip revision: 05217c4ed32e001e14eca2b9c32c8a21d363b8b3 authored by Alexey Sergushichev on 11 December 2018, 21:13:22 UTC
metadata update
Tip revision: 05217c4
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