tests/testthat/test_getDrugActivityRepeatData.R

test_that("getDrugActivityRepeatData returns the correct output", {
	nsc <- "609699"
	drugRepeatAct <- exprs(getRepeatAct(rcellminerData::drugData))
	drugRepeatAnnot <- as(featureData(getRepeatAct(rcellminerData::drugData)), "data.frame")
	
	actData <- getDrugActivityRepeatData(nsc, onlyCellMinerExps = FALSE)
	actDataCm <- getDrugActivityRepeatData(nsc)
	
	iNsc <- which(drugRepeatAnnot$nsc == nsc)
	tmp <- drugRepeatAct[iNsc, ]
	rownames(tmp) <- paste0(nsc, "_", seq(nrow(tmp)))
	expect_identical(tmp, actData)
	
	iNsc <- iNsc[drugRepeatAnnot$used_in_zscore[iNsc]]
	tmp <- drugRepeatAct[iNsc, ]
	rownames(tmp) <- paste0(nsc, "_", seq(nrow(tmp)))
	expect_identical(tmp, actDataCm)
})

Try the rcellminer package in your browser

Any scripts or data that you put into this service are public.

rcellminer documentation built on Nov. 26, 2020, 2:02 a.m.