ctlab / fgsea

Fast Gene Set Enrichment Analysis
Other
379 stars 67 forks source link

is there any way to output all results of all inputted pathways #86

Closed helianthuszhu closed 3 years ago

helianthuszhu commented 3 years ago

Hi these, Thanks for providing so super fast enrichment analysis tool. I am just wondering whether fgsea can output all the results of candidate pathways. Let's say the example, there are 1457 pathways provided, but the results only got 586 pathways output. Is there anyway that can get all the enrichment results of those 1457 pathways. Thank you very much!

assaron commented 3 years ago

Currently, there is no way to do this: only pathways that pass the size filters (minSize and maxSize) are present in the result table.

What is your scenario? Why do you need it?

helianthuszhu commented 3 years ago

Hi, my plan is to use fgsea to get the enrichment score for each inputted pathway in each sample based on the ranked expression of genes in each sample, no matter whether the pathways is significant or not. I know, for the enrichment score, some pipelines such as ssGSEA, can do it for each pathway in individual samples. I want to check whether using fgsea derived enrichment score is better, for example, clustering the samples. do you have any idea about this? thanks.

assaron commented 3 years ago

By default minSize=1 and maxSize=Inf which leads to output of all the pathways, that have at least one gene in common with the ranks. The number of pathways does not depend on whether they are significant or not. And you can't really go below minSize=1 as enrichment score is not defined for an empty pathway.

So if you want to have the same number of input and output pathways, make sure you first filter the pathways with empty intersection with the gene universe. I believe it doesn't really make sense to consider such pathways in any other method as well.

helianthuszhu commented 3 years ago

Thank you very much. Your explanation is very clear for me.