Fix empty wgcna$gsea for custom-organism and lipidomics datasets - #478
Conversation
|
Fine by me. Q: why are you not dropping fallback TEST sets from the list? |
|
@zitoa sorry i now realize screenshots are a little bit wrong. fallback TEST are then only gsets for some datasets, in fact on the pictured fission-custom is one of those cases - those TEST are only auto generated for those datasets where they have 0 gsets, so keeping them is a way of not showing error plots |
ivokwee
left a comment
There was a problem hiding this comment.
Reviewed: the 7-line filter exemption is correct and minimal. Keeping CUSTOM/TEST/METABOLITE sets through the reference-name filter fixes the empty wgcna$gsea for custom-organism and lipidomics datasets, and mirrors the CUSTOM exemption in pgx.compute() — consistent with the fallback-TEST rationale in the thread above. CI green, no conflicts.
|
@ESCRI11 Approved. One blocker before this can merge: the branch is currently conflicting against `edgy`, so it needs a rebase first. Also worth settling your open question from the description (always-keep METABOLITE sets vs. only-when-there-are-no-pathway-matches) on that rebase — happy to re-review whichever way you land it. |
…filter wgcna$gsea was empty for custom-organism (fission-custom) and lipidomics datasets: after gset.filter = "PATHWAY|HALLMARK|^GO|^C[1-9]" no genesets were left. Exempt CUSTOM/TEST sets unconditionally (for custom organisms they are the only applicable sets, mirroring the CUSTOM exemption in pgx.compute), and METABOLITE sets only as a fallback when nothing matches the filter. METABOLITE_PATHWAY already matches "PATHWAY", so an unconditional exemption would only add METABOLITE_ONTOLOGY/CHEMCLASS and drown real pathway hits -- this settles the open question from the PR description. The enrichment body now lives in WGCNAplus, which greps the same colnames after row-subsetting, so the augmented filter is applied there. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012KNgu8HbV8R9GCU78PKPM4
2507246 to
79abf45
Compare
source of problem
WGCNA module enrichment (
wgcna$gsea) was empty for opg-exampledata:fission-customandlipidomicsafter
gset.filter = "PATHWAY|HALLMARK|^GO|^C[1-9]"we get 0 gsets so an empty gsea fieldfix
as we do on pgx.compute after filtering gsets i bring back test/custom/metabolite
test/custom im quite sure it's good to actually include. metabolite not so sure as it brings some metabolite_ontology/chemclass that might pollute the enrichment analysis for metabolite datasets that have metabolite_patwhays matches
maybe i can include all metabolomics ones if there are no matches?
before
after