Nothing
context("Test: TAI() ")
data(PhyloExpressionSetExample)
nonStandardExpressionSet <- PhyloExpressionSetExample[, 2:9]
test_that("is.ExpressionSet() throughs error when no ExpressionSet is entered to TAI()",
{
expect_error(
TAI(nonStandardExpressionSet)
)
})
testTAIFunc <- function(ExpressionSet) {
ncols <- ncol(ExpressionSet)
TAIVals <- vector("numeric", ncols - 2)
for (i in 1:(ncols - 2)) {
TAIVals[i] <-
sum((ExpressionSet[, 1] * ExpressionSet[, i + 2]) / sum(ExpressionSet[, i +
2]))
}
names(TAIVals) <- names(ExpressionSet)[3:ncols]
return(TAIVals)
}
test_that("TAI() computes correct values ", {
expect_equal(TAI(PhyloExpressionSetExample),
testTAIFunc(PhyloExpressionSetExample))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.