liana.plotting.interactions#
- liana.plotting.interactions(misty=None, interactions=None, view=None, top_n=None, ascending=False, key=None, filter_fun=None, aggregate_fun=None, figure_size=(5, 5), return_fig=True)#
Plot interaction importances.
- Parameters:
misty (
MistyData(default:None)) – MistyData object with modelling resultsinteractions (
DataFrame(default:None)) – Interactions from which to plot the importanceview (
str(default:None)) – A Misty view to plottop_n (
int(default:None)) –top_nentities to plot.ascending (
bool(default:False)) – Whether to sort interactions in ascending orderkey (
str(default:None)) – Key to use when sorting interactionsfilter_fun (
Callable(default:None)) – A function, applied along the columns (axis=1), used to filter the results to be plotted.aggregate_fun (
Callable(default:None)) – A function used to aggregate the results to be plotted.figure_size (
tuple[float,float] (default:(5, 5))) – Figure x,y sizereturn_fig (
bool(default:True)) –boolwhether to return the fig object.
- Return type:
Figure- Returns:
A plotnine plot.
- Raises:
ValueError – If neither
mistyorinteractionsinput orvieware not provided.