ctlab / fgsea

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

p.val threshold error in collapsePathways () #115

Closed acaulier closed 2 years ago

acaulier commented 2 years ago

Hello, I'm running a gsea analysis using msigdbr package, with following code : fgsea_CP <- fgsea(stats = foldchanges, pathways = pathways_cp, minSize = 10, maxSize = 1000 )

If filtering for padj<0.01, i get 32 pathways, and most of them seem similar (cell cycle features)

So i wanted to collapse them, and ran this command : collapsePathways( fgsea_CP, pathways_cp, foldchanges, pval.threshold = 0.05, nperm = 10/pval.threshold, gseaParam = 1 )

But i got this error then : Error in fgseaSimple(pathways = pathways[pathwaysUp], stats = stats[u1], : object 'pval.threshold' not found Traceback:

  1. collapsePathways(fgsea_CP, pathways_cp, foldchanges, pval.threshold = 0.05, . nperm = 10/pval.threshold, gseaParam = 1)
  2. fgseaSimple(pathways = pathways[pathwaysUp], stats = stats[u1], . nperm = nperm, maxSize = length(u1) - 1, nproc = 1, gseaParam = gseaParam, . scoreType = "pos")

Any recommendation to correct it?

Thank you!

vdsukhov commented 2 years ago

@acaulier Hi, could you provide the pathways and stats, please? It would help me to reproduce the error.

acaulier commented 2 years ago

@vdsukhov I eventually got around this error by using: collapsedPathways <- collapsePathways(fgsea_CP[order(pval)][padj < 0.1], pathways_cp, foldchanges)

instead of the pval.threshold argument

Thank you for assistance!