I'm trying to determine if some particular measurements - in this case taken from a subset of genes of interest (50 genes) - show a significant difference to the rest of the population (15000 genes), by comparing them to a randomly generated subset of 50 genes from within the population of 15000. I present the data for the test genes alongside the random control set in boxplot form, in R, and do a Wilxocon rank sum test to see if there's a significant difference between the two populations:
sample50 <- genes[sample(1:nrow(genes), 50, replace = FALSE), ] wilcox.test(test_genes[, 2], sample50[, 2])
However my problem is that my P-value varies a LOT each time I generate a new set of 50 random values to compare my gene set of interest to (presumably because the population is quite variable, and 50 is a relatively small sample). Does anyone know how I would better determine if my test genes are significantly different? I've been told it might be something like Monte Carlo or Bootstrapping for the random sample but I'm unsure how to do this in my case or how to proceed. Many thanks.