dynamo.pl.loading

dynamo.pl.loading(adata, n_pcs=10, loading_key='PCs', n_top_genes=10, ncol=5, figsize=(6, 4), save_show_or_return='show', save_kwargs={})[source]

Plot the top absolute pca loading genes.

Red text are positive loading genes while black negative loading genes.

Parameters
  • adata (AnnData) – An Annodata object that has pca and loading information prepared.

  • n_pcs (int) – Number of pca.

  • loading_key (str) – A key to the pca loading matrix, in either .uns or .obsm.

  • n_top_genes (int) – Number of top genes with highest absolute loading score.

  • ncol (int) – Number of panels on the resultant figure.

  • figsize (tuple) – Figure size.

  • save_show_or_return ({‘show’, ‘save’, ‘return’} (default: show)) – Whether to save, show or return the figure.

  • save_kwargs (dict (default: {})) – A dictionary that will passed to the save_fig function. By default it is an empty dictionary and the save_fig function will use the {“path”: None, “prefix”: ‘biplot’, “dpi”: None, “ext”: ‘pdf’, “transparent”: True, “close”: True, “verbose”: True} as its parameters. Otherwise you can provide a dictionary that properly modify those keys according to your needs.

Returns

  • If save_show_or_return is not return, return nothing but plot or save the biplot; otherwise return an axes

  • with the loading plot in it.