Modify hypergeometric test?

I have a problem with the fundamentals of hypergeometric distribution for gene enrichment analysis. Here is the problem: I have a set of genes (population size 1500), a mixture of various genes including tumor suppressors (TS), oncogenes (OG), etc. Let's say the number of TS in the population is 700 (number of success in the population). Now, I have a so-called algorithm claiming that has the ability to select a subset of genes showing a cancerous behavior (meaning if the algorithm select the highest number of OG and the fewest number of TS, it has high predictive power). So, if the presumed algorithm can select a subset of 1080 genes (sample size) which 20 of them are TS (number of success in the sample size), the algorithm seems (qualitatively) to acts highly selective.

Nevertheless, when using hypergeometric test, the resulting p-value is insignificant, simply because the number of TS is considerably low and the test wrongly shows the algorithm behaved by chance. But, the point is that as the number of successes in the sample size decrease it represents the predictive power of algorithm. Therefore, how can I manage this situation and modify my problem? I thing I cannot simply use 1-calculated_p_value or use Fisher's test here, because the population size comprises of various genes and not TS and non-TS (maybe I am not correct).

I appreciate any help in advance.

• It would help to change the example: if it's not made up your insouciance with regard to the demonstrated impossibility of the results is surprising. It would also help to explain - in the question - exactly what procedure you're carrying out: I think it may simply be a matter of picking the wrong one-tailed test. And I don't know what "1-calculated p-value" means. Commented Jul 11, 2017 at 21:25
• @Scortchi Well OP says the data are real ... but still doesn't seem to find getting more failures in the sample than the population shocking. Commented Jul 12, 2017 at 5:41

Your example numbers don't seem to work.

The information you give is:

                 Succ  Fail  Total
Population:   700     -    1500
Sampled:      20     -    1080
Remaining:     -     -       -


So let's start filling out the rest of the table:

                 Succ  Fail  Total
Population:   700    800   1500
Sampled:      20   1060   1080
Remaining:   680   -260    420


Somehow out of a population of 800 Failures you managed to select 1060 of them leaving -260 of them in the unsampled part of the population. That's pretty good going.

I don't know how your software works but it shouldn't be producing a p-value for that.

• using this link we can perform such task, and the resulting p-value would be 1 (Probability of drawing 20 successes or more from a sample of 1080). However, I use MATLAB to calculate hypergeometric p-value: hygecdf, which produces the same result. So, I don't get your point. I appreciate if you correct me.
– Ivea
Commented Jul 11, 2017 at 11:13
• You should probably have mentioned in your question you were doing a one-tailed test. The tool at that linked page seems to only calculate the probability of at least 20 successes without checking whether 20 is possible at all (280 is the lowest possible number of successes given the other information in your question; it gives the same p-value for that as for 20) Commented Jul 11, 2017 at 12:34
• @ Glen_b: Yes, sorry for that. I'd forgot to mention one-tailed test. Nonetheless, in this situation when "fewest successes" is the goal, how can I calculate hypergeometric p-value? Because it always produces an insignificant p-value. Can I use 1-calculated_p_value? In my case, enrichment term is a bit confusing, since a successful algorithm is the one which select the fewest number of TS genes. Thanks again for your time.
– Ivea
Commented Jul 11, 2017 at 15:06
• You're jumping too far ahead. The situation itself is unclear. The fact that you mention a situation that's impossible in hypergeometric sampling suggests that (if this is real data) you're simply not doing the right test because the one you're trying to use doesn't apply at all. Until that's completely clear, I think the rest of your question shouldn't be answered at all. Otherwise there's a good chance of giving an answer to entirely the wrong question. Commented Jul 12, 2017 at 1:03
• @ Glen_b: sorry to ask again, since I am quite new to the field of statistics/biostatistics. Is it impossible to pick a sample size of 1080 from a population size of 1500, containing 20 successes among all 700 successes in the population? My data is indeed real and is output of one algorithm. So, If I change the problem to this: how can I measure the probability that my algorithm drew the sample by chance or not? Will it be still meaningless? Best.
– Ivea
Commented Jul 12, 2017 at 4:59