dandelion.plotting.clone_overlap

dandelion.plotting.clone_overlap(self, groupby, colorby, min_clone_size=None, clone_key=None, color_mapping=None, node_labels=True, node_label_layout='rotation', group_label_position='middle', group_label_offset=8, figsize=(8, 8), return_graph=False, save=None, **kwargs)[source]

A plot function to visualise clonal overlap as a circos-style plot. Requires nxviz.

Parameters
  • self (Dandelion, AnnData) – Dandelion or AnnData object.

  • groupby (str) – column name in obs/metadata for collapsing to nodes in circos plot.

  • colorby (str) – column name in obs/metadata for grouping and color of nodes in circos plot.

  • min_clone_size (int, optional) – minimum size of clone for plotting connections. Defaults to 2 if left as None.

  • clone_key (str, optional) – column name for clones. None defaults to ‘clone_id’.

  • color_maopping (Dict, Sequence, optional) – custom color mapping provided as a sequence (correpsonding to order of categories or alpha-numeric order if dtype is not category), or dictionary containing custom {category:color} mapping.

  • node_labels (bool, optional) – whether to use node objects as labels or not

  • node_label_layout (bool, optional) – which/whether (a) node layout is used. One of ‘rotation’, ‘numbers’ or None.

  • group_label_position (str) – The position of the group label. One of ‘beginning’, ‘middle’ or ‘end’.

  • group_label_offset (int, float) – how much to offset the group labels, so that they are not overlapping with node labels.

  • figsize (Tuple[Union[int,float], Union[int,float]]) – figure size. Default is (8, 8).

  • return_graph (bool) – whether or not to return the graph for fine tuning. Default is False.

  • **kwargs – passed to matplotlib.pyplot.savefig.

Returns

Return type

a nxviz.CircosPlot.