blitzgsea
blitzgsea copied to clipboard
are there cases for significantly enriched pathways found without any genes in leading edges?
could you please explain the logic behind such cases?
Do you have any examples, so I can recreate the issue? If you have empty leading edges then I suspect there is some underlying issue. By definition, this should not be possible. The leading edge consists of the genes that occur before the running sum reaches its maximum deviation from 0. The running sum either has a negative or positive deviation. In the case the max deviation is negative the genes to the right of the max are the leading edge, and for positive it is the genes to the left.
It's a bit problematic for me at the moment. it is helpful though to know that this is an undesired behavior, so I can closely inspect its origin.
one thing I found is that in cases where the top gene of the signature is the one deriving the enrichment score (i.e., rmax == 0
), I don't receive a leading edges because the right handside of following line will result in an empty set:
lgenes = set(hits).intersection(set(range(rmax)))
line 79
thus, will never result in an intersection. does that make sense?
I am closing the issue since this seems to be an extreme edge case. I have not encountered this behavior since. If it still persists I am happy to reopen the issue.