tests/testthat/test_correlatePCs.R

test_that("Correlation of the PCs", {
  pcaobj <- prcomp(t(assay(rlt_multifac)))
  res <- correlatePCs(pcaobj, colData(dds_multifac))
  
  expect_equal(dim(res), c(4, 2))
  expect_equal(colnames(res), colnames(colData(dds_multifac)))
  
  plotPCcorrs(res)
  
  plotPCcorrs(res, logp = FALSE, pc = 2)
})
federicomarini/pcaExplorer documentation built on Dec. 21, 2024, 8:47 p.m.