tests/testthat/test_getMinDrugActivityRepeatCor.R

test_that("getDrugName() returns correct information", {
	testNscSet <- c("609699", "94600")
	
	funcResultsTab <- getMinDrugActivityRepeatCor(testNscSet)
	
	for (nsc in testNscSet){
		repData <- getDrugActivityRepeatData(nsc)
		xCorDat <- crossCors(repData)
		iMax <- which(xCorDat$pval == max(xCorDat$pval, na.rm = TRUE), arr.ind=TRUE)[1, ]
		expect_identical(funcResultsTab[nsc, "cor"], 
										 round(xCorDat$cor[iMax["row"], iMax["col"]], digits = 3))
		expect_identical(funcResultsTab[nsc, "pval"], 
										 signif(xCorDat$pval[iMax["row"], iMax["col"]], digits = 3))
	}
})

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.