dynamo.pl.hivePlot¶
- dynamo.pl.hivePlot(adata, edges_list, cluster, cluster_names=None, weight_threshold=0.0001, figsize=(6, 6), save_show_or_return='show', save_kwargs={})[source]¶
Hive plot of cell cluster specific gene regulatory networks.
- Parameters:
adata (
AnnData) – an AnnData object.edges_list (
Dict[str,DataFrame]) – a dictionary of dataframe of interactions between input genes for each group of cells based on ranking information of Jacobian analysis. Each composite dataframe has regulator, target and weight three columns.cluster (
str) – the group key that points to the columns of adata.obs.cluster_names (
Optional[List[str]] (default:None)) – the group whose network and arcplot will be constructed and created. Defaults to None.weight_threshold (
float(default:0.0001)) – the threshold of weight that will be used to trim the edges for network reconstruction. Defaults to 1e-4.figsize (
Tuple[float,float] (default:(6, 6))) – the size of each panel of the figure. Defaults to (6, 6).save_show_or_return (
Literal['save','show','return'] (default:'show')) – whether to save, show, or return the figure. Could be one of “save”, “show”, or “return”. Defaults to “show”.save_kwargs (
Dict[str,Any] (default:{})) – a dictionary that will be passed to the save_fig function. By default, it is an empty dictionary and the save_fig function will use the {“path”: None, “prefix”: ‘hiveplot’, “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. Defaults to {}.
- Raises:
ImportError – networkx or hiveplotlib not installed
ValueError – invalid edge_keys
ValueError – invalid cluster_names
ValueError – weight_threshold too high to have any edge to pass it.
- Return type:
- Returns:
None would be returned by default. If save_show_or_return is set to return, the matplotlib axes of the figure would be returned.