liana-py icon indicating copy to clipboard operation
liana-py copied to clipboard

Update _tileplot.py for plotnine >=0.13

Open redst4r opened this issue 1 month ago • 1 comments

With plotnine>=0.13 they changed the interface of facet_grid (see Release notes); there's not more argument facets and doing something like the tutorial

li.pl.tileplot(liana_res=lr_res,
               fill = 'expr',
               label='padj',
               label_fun = lambda x: '*' if x < 0.05 else np.nan,
               top_n=15,
               orderby = 'interaction_stat',
               orderby_ascending = False,
               orderby_absolute = False,
               source_title='Ligand',
               target_title='Receptor',
               )

will fail with plotnine>=0.13.

As a simple fix, just remove the named argument in facet_grid solves the issue and is backwards compatible. Thanks for creating this awesome package!

redst4r avatar May 15 '24 21:05 redst4r