Plotting
Functions to generate standard HIPPO plots
- hippo.plotting.add_hippo_logo(fig, in_plot=True, position='top right')[source]
- Parameters:
fig –
in_plot – (Default value = True)
position – (Default value = ‘top right’)
- hippo.plotting.plot_building_blocks(animal, subtitle=None, color='name_is_smiles')[source]
- Parameters:
animal –
subtitle – (Default value = None)
color – (Default value = ‘name_is_smiles’)
- hippo.plotting.plot_compound_availability(animal, compounds=None, title=None, subtitle=None)[source]
- Parameters:
animal –
compounds – (Default value = None)
title – (Default value = None)
subtitle – (Default value = None)
- hippo.plotting.plot_compound_availability_venn(animal, compounds)[source]
- Parameters:
animal –
compounds – (Default value = None)
title – (Default value = None)
subtitle – (Default value = None)
- hippo.plotting.plot_compound_price(animal, compounds=None, min_amount=1, subtitle=None, title=None, style='histogram', **kwargs)[source]
- Parameters:
animal –
compounds – (Default value = None)
min_amount – (Default value = 1)
subtitle – (Default value = None)
title – (Default value = None)
style – (Default value = ‘histogram’)
**kwargs –
- hippo.plotting.plot_compound_property(animal, prop, compounds=None, style='bar', null=None, hover_data=None, custom_data=None)[source]
Get an arbitrary property from all the compounds in animal.compounds
If one property, plot a 1D histogram If 2D plot a bar/scatter
- Parameters:
animal –
prop –
compounds – (Default value = None)
style – (Default value = ‘bar’)
null – (Default value = None)
- hippo.plotting.plot_compound_tsnee(animal: HIPPO | None = None, compounds: CompoundSet | None = None, df: pd.DataFrame | None = None, title: str | None = None, subtitle: str | None = None, legend: bool = False, symbol: str = 'type', sort_by: str = 'type', color: str = 'cluster', cluster_by: str = 'scaffolds', **kwargs) plotly.graph_objects.Figure[source]
Plot a compound tanimoto similarity plot with principal components determined by pattern binary fingerprint similarity.
- Parameters:
compounds – compounds to plot
df – optional pre-computed DataFrame
title – plot title
subtitle – plot subtitle
legend – show the plot legend
symbol – property used to determine symbol
sort_by – property used to sort dataframe
color – property used to determine marker color
- Returns:
plotly.graph_objects.Figure
- hippo.plotting.plot_interaction_histogram(animal, poses, feature_metadata, subtitle=None)[source]
- Parameters:
animal –
poses –
feature_metadata –
subtitle – (Default value = None)
- hippo.plotting.plot_interaction_punchcard(animal, poses=None, subtitle=None, opacity=1.0, group: str = 'pose_name', ignore_chains=False)[source]
- Parameters:
animal –
poses – (Default value = None)
subtitle – (Default value = None)
opacity – (Default value = 1.0)
group – (Default value = ‘pose_name’)
ignore_chains – (Default value = False)
- hippo.plotting.plot_interaction_punchcard_by_tags(animal, tags: dict[str, str] | list[str], permitted_residues: dict[str, list[int]] | None = None, yaxis_title: str = 'Tag', subtitle=None, opacity=0.7, group='type', marginal_histogram_x: bool = True, sizeref=0.08, counts: bool = True, ignore_chains=True, backbone_only: bool = False, sidechain_only: bool = False, return_plot_data: bool = False)[source]
- Parameters:
animal –
poses – (Default value = None)
subtitle – (Default value = None)
opacity – (Default value = 1.0)
group – (Default value = ‘pose_name’)
ignore_chains – (Default value = False)
permitted_residues – dictionary mapping with keys matching tags mapping to list of IDs for residues to include for each tag
- hippo.plotting.plot_numbers(animal, subtitle=None)[source]
y-axis: numbers
- x-categories
hits
hit poses
scaffolds
scaffold poses
elabs
elab poses
BBs (total)
BBs (in enamine)
- Parameters:
animal –
subtitle – (Default value = None)
- hippo.plotting.plot_pose_interactions(animal: HIPPO, pose: Pose) plotly.graph_objects.Figure[source]
3d figure showing the interactions between a
Poseand the protein. In a Jupyter notebook this figure may be unusable, instead write it as a HTML file and open it in your browser:import molparse as mp fig = animal.plot_pose_interactions(pose) mp.write(f'{pose}_interactions.html', fig)
- Parameters:
pose – the
Posewhose interactions are to be rendered
- hippo.plotting.plot_pose_property(animal, prop, poses=None, style='scatter', title=None, null=None, color=None, log_y=False, subtitle=None, data_only=False, custom_data=None, **kwargs)[source]
Get an arbitrary property from all the poses in animal.poses
If one property, plot a 1D histogram If 2D plot a scatter plot
- Parameters:
animal –
prop –
poses – (Default value = None)
style – (Default value = ‘scatter’)
title – (Default value = None)
null – (Default value = None)
color – (Default value = None)
log_y – (Default value = False)
subtitle – (Default value = None)
data_only – (Default value = False)
**kwargs –
- hippo.plotting.plot_reactant_amounts(animal, subtitle=None, color='has_price_picker', named_only=False, most_common=None)[source]
- Parameters:
animal –
subtitle – (Default value = None)
color – (Default value = ‘has_price_picker’)
named_only – (Default value = False)
most_common – (Default value = None)
- hippo.plotting.plot_reactant_price(animal, subtitle=None, amount=20)[source]
- Parameters:
animal –
subtitle – (Default value = None)
amount – (Default value = 20)
- hippo.plotting.plot_reactants_2d(animal, subtitle=None, amount=20)[source]
- Parameters:
animal –
subtitle – (Default value = None)
amount – (Default value = 20)
- hippo.plotting.plot_reaction_funnel(animal, title=None, subtitle=None)[source]
- Parameters:
animal –
title – (Default value = None)
subtitle – (Default value = None)
- hippo.plotting.plot_residue_interactions(animal, residue_number, poses: str | None = None, subtitle: str | None = None, chain: str | None = None, target: int = 1)[source]
- Parameters:
animal –
poses –
residue_number –
subtitle – (Default value = None)
chain – (Default value = None)
- hippo.plotting.plot_synthetic_routes(animal, subtitle=None, cset='elabs', color='num_reactants')[source]
- Parameters:
animal –
subtitle – (Default value = None)
cset – (Default value = ‘elabs’)
color – (Default value = ‘num_reactants’)
- hippo.plotting.plot_tag_statistics(animal, color='type', subtitle=None, log_y=False, show_compounds=True, show_poses=True, compounds=None, poses=None, title: str | None = None, skip: list[str] | None = None)[source]
- Parameters:
animal –
color – (Default value = ‘type’)
subtitle – (Default value = None)
log_y – (Default value = False)
compounds – (Default value = True)
poses – (Default value = True)