montilab / hypeR

An R Package for Geneset Enrichment Workflows
https://montilab.github.io/hypeR-docs/
GNU General Public License v3.0
75 stars 11 forks source link

.check_overlap returns a fraction, not a percentage #40

Closed sidorov-si closed 2 years ago

sidorov-si commented 2 years ago

Dear hypeR developers,

When trying hypeR for the first time, I set quiet = FALSE in my hypeR(...) call, and the output said that Percentage of signature found across genesets: 1%, which I knew was wrong becasue 100% of my signature overlaps with the several genesets I use. When I checked the source code, I realised that the .check_overlap function returns an overlap as a fraction (from 0 to 1), not a percentage (from 0 to 100): https://github.com/montilab/hypeR/blob/eaa02ede1e84b0cbc64c025c61561ba6c24bc645/R/utils.R#L37 and this fraction is not multiplied by 100 when is printed as a percentage in https://github.com/montilab/hypeR/blob/eaa02ede1e84b0cbc64c025c61561ba6c24bc645/R/hype.R#L136 So 1% here actually means 100%. It would be great to fix this! :) Thank you!

anfederico commented 2 years ago

Weird - you should only get this warning if < 5% of the signature can be found in the union of your genesets (default). Anyway - good catch, will fix.