## Create random optimized annotation matrix for 50 gene sets and 100 genes.
## This mimics what is generated by the EMVC() function
opt.annotations = matrix(runif(5000), nrow=50, ncol=100)
## Total number of non-zero annotations
length(which(opt.annotations > 0))
## Filter the results at .5 threshold. The number should be approximately half
## of the non-zero annotations since the proportions were generated as uniform(0,1)
filtered.opt.annotations = filterAnnotations(opt.annotations, .5)
sum(filtered.opt.annotations)
Run the code above in your browser using DataLab