liana.pl.tileplot#
- liana.pl.tileplot(adata=None, liana_res=None, fill=None, label=None, label_fn=None, source_labels=None, target_labels=None, ligand_complex=None, receptor_complex=None, uns_key='liana_res', top_n=None, orderby=None, orderby_ascending=False, orderby_absolute=True, filter_fn=None, source_title=None, target_title=None, cmap='viridis', figure_size=(5, 5), label_size=12, return_fig=True)#
Tileplot interactions by source and target cells
- Parameters:
- adata
AnnData|None(default:None) Annotated data object.
- liana_res
DataFrame|None(default:None) liana_resaDataFramein liana’s format.- fill
str|None(default:None) columninliana_resto define the fill of the tiles- label
str|None(default:None) columninliana_resto define the label of the tiles- label_fn
Callable[[object],str] |None(default:None) callableto apply to thelabelcolumn- source_labels
str|list[str] |None(default:None) List of labels to use as
source, the rest are filtered out.- target_labels
str|list[str] |None(default:None) List of labels to use as
target, the rest are filtered out.- ligand_complex
str|list[str] |None(default:None) listof ligand complexes to filter the interactions to be plotted. Defaults to None.- receptor_complex
str|list[str] |None(default:None) listof receptor complexes to filter the interactions to be plotted. Defaults to None.- uns_key
str(default:'liana_res') Key in
adata.unsthat contains the LIANA results. Default is'liana_res'.- top_n
int|None(default:None) top_nentities to plot.- orderby
str|None(default:None) If
top_nis notNone, order the interactions by this column- orderby_ascending
bool(default:False) If
top_nis notNone, specify how to order the interactions- orderby_absolute
bool(default:True) If
top_nis notNone, whether to order by the absolute value of theorderbycolumn.- filter_fn
Callable[[Series],bool] |None(default:None) A function, applied along the columns (axis=1), used to filter the results to be plotted.
- source_title
str|None(default:None) Title for the source facet. Default is ‘Source’
- target_title
str|None(default:None) Title for the target facet. Default is ‘Target’
- cmap
str(default:'viridis') Colour map to use for plotting.
- figure_size
tuple[float,float] (default:(5, 5)) Figure x,y size
- label_size
int(default:12) Size of the label text
- return_fig
bool(default:True) boolwhether to return the fig object.
- adata
- Return type:
- Returns:
The resulting tileplot
Examples
fillandlabeleach name a suffix shared by aligand_/receptor_pair of columns, so both sides of every interaction are tiled next to each other:>>> import liana as li >>> adata = li.ds.generate_toy_adata() >>> li.mt.cellphonedb(adata, groupby="bulk_labels", n_perms=100) >>> p = li.pl.tileplot(adata, fill="means", label="props", top_n=10, orderby="lr_means")