From a7968fd6c872be0d3acee80120bd1acba2f7e987 Mon Sep 17 00:00:00 2001 From: Nicolas Palacio Date: Sat, 16 Nov 2024 13:40:53 +0100 Subject: [PATCH] Implemented new `plot_enrich` function into GUI --- src/funki/pages/enrichment.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/funki/pages/enrichment.py b/src/funki/pages/enrichment.py index 345fb54..e160472 100644 --- a/src/funki/pages/enrichment.py +++ b/src/funki/pages/enrichment.py @@ -350,16 +350,7 @@ def plot_enrich(n_clicks, data, gset_data, meth, gset): weight='weight' if 'weight' in net.columns else None, ) - res = dset.obsm['consensus_estimate'].mean(axis=0) - res.sort_values(ascending=False, inplace=True) - res = res.head(10)[::-1] if len(res) > 10 else res[::-1] - - fig = px.bar( - res, - orientation='h', - ) - - fig.update_layout(showlegend=False) + fig = fpl.plot_enrich(dset) return fig, dataset_to_serial(dset)