liana-py
liana-py copied to clipboard
Update _tileplot.py for plotnine >=0.13
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!