montilab / hypeR

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

GSEA arguement not recognised hypeR #29

Closed Mbxlasi closed 3 years ago

Mbxlasi commented 3 years ago

Hi I hope you can help. I have tried to perform GSEA using hype R and using the following code: hyp_obj <- hypeR(weighted.signature, genesets, test="gsea", background=30000)

However I am met with the following error: Error in match.arg(test) : 'arg' should be one of “hypergeometric”, “kstest”

It doesn't seem to recognise the gsea argument as layed out in the user guide. It works fine for the hypergeometric so I know my genes are recognised and I have tried passing the weighted signature in the same format as the guide to no avail. Thank you for your time.

anfederico commented 3 years ago

The kstest method will accept either a weighted or unweighted signature. If you're looking for computing permutation-based significance like in the original GSEA method, try out fgsea. You can format the output into a hyp object and use the downstream methods of hypeR.