plot_DDGs#

cinnabar.plotting.plot_DDGs(graph: DiGraph, method_name: str = '', target_name: str = '', title: str = '', map_positive: bool = False, filename: str | None = None, symmetrise: bool = False, plotly: bool = False, data_label_type: str = None, bootstrap_x_uncertainty: bool = False, bootstrap_y_uncertainty: bool = False, statistic_type: str = 'mle', **kwargs)[source]#

Function to plot relative free energies

Parameters:
  • graph (nx.DiGraph) – graph object with relative free energy edges

  • method_name (string, optional) – name of method associated with results, e.g. ‘perses’

  • target_name (string, optional) – name of system for results, e.g. ‘Thrombin’

  • title (string, default = ‘’) – Title for the plot

  • map_positive (bool, default=False) – whether to map all DDGs to the positive x values. this is an aesthetic choice

  • filename (str, default = None) – filename for plot

  • symmetrise (bool, default = False) – whether to plot each datapoint twice, both positive and negative

  • plotly (bool, default = False) – whether to use plotly to generate the plot

  • data_label_type (str or None, default = None) – type of data label to add to each edge

    if None data labels will not be added

    if 'small-molecule' edge labels will be f"{node_A_name}→{node_B_name}".

    if 'protein-mutation' edge labels will given as single letter amino acid codes separated by the mutated residue index (eg. "Y29A")

    If both node names start with "-", the negative sign will be factored out (eg. "-(Y29A)" or "-(benzene→toluene)").

    currently unsupported for plotly-generated plots

  • bootstrap_x_uncertainty (bool, default False) – whether to account for uncertainty in x when bootstrapping

  • bootstrap_y_uncertainty (bool, default False) – whether to account for uncertainty in y when bootstrapping

  • statistic_type (str, default ‘mle’) – the type of statistic to use, either ‘mle’ (i.e. sample statistic) or ‘mean’ (i.e. bootstrapped mean statistic)

Return type:

Nothing