# generate some fake data to use in the example
nr <- 40000
nc <- 110
fake.data <- matrix(rnorm(nr*nc), ncol=nc)
fake.class <- rep(c(TRUE, FALSE), c(40, 70))
# perform the tail-rank test
null.tr <- TailRankTest(fake.data, fake.class)
# get a summary of the results
summary(null.tr)
# plot a histogram of the statistics
hist(null.tr, overlay=TRUE)
# get the actual statistics
stats <- getStatistic(null.tr)
# get a vector that selects the "positive" calls for the test
is.marker <- as.logical(null.tr)
# the following line should evaluate to the number of rows, nr = 40000
sum( is.marker == (stats > null.tr@cutoff) )
Run the code above in your browser using DataLab