API Documentation
Targets
targets.py Functions and classes for handling the target data.
- class plbenchmark.targets.Target(name: str)[source]
Class to store the data of one target.
- add_ligand_data()[source]
Adds data from ligands to
plbenchmark.targets.target
. Molecule images and the minimum and maximum affinity are added.- Returns
None
- find_links()[source]
Processes primary data to have links in the html string of the target data
- Returns
None
- get_dataframe(columns=None)[source]
Access the target data as a
pandas.DataFrame
- Parameters
cols –
list
of columns which should be returned in thepandas.DataFrame
- Returns
pandas.DataFrame
- get_edge_set()[source]
Get
plbenchmark:edges:edgeSet
associated with the target- Returns
plbenchmark:edges:edgeSet
object
- get_edge_set_dataframe(columns=None)[source]
Get
plbenchmark:edges:edgeSet
associated with the target as apandas.DataFrame
- Parameters
columns – list of columns which should be returned in the
pandas.DataFrame
- Returns
plbenchmark:edges:edgeSet
object
- get_edge_set_html(columns=None)[source]
Get
plbenchmark:edges:edgeSet
associated with the target in a html string- Parameters
columns –
list
of edge which should be returned- Returns
html string
- get_graph()[source]
Get a graph representation of the ligand perturbations associated with the target in a
matplotlib.figure
- Returns
matplotlib.figure
- get_ligand_set()[source]
Get
ligandSet
associated with the target- Returns
plbenchmark.ligands.ligandSet
object
- get_ligand_set_dataframe(columns=None)[source]
Get
ligandSet
associated with the target in apandas.DataFrame
- Parameters
columns –
list
of columns which should be returned in thepandas.DataFrame
- Returns
pandas.DataFrame
- class plbenchmark.targets.TargetSet(*arg, **kw)[source]
Class inherited from dict to store all available targets in plbenchmark.
- get_dataframe(columns=None)[source]
Convert targetSet class to
pandas.DataFrame
- Parameters
columns –
list
of columns which should be returned in thepandas.DataFrame
- Returns
pandas.DataFrame
- plbenchmark.targets.get_target_data_path(target)[source]
Gets the file path of the target data
- Parameters
target – string with target name
- Returns
list of directories (have to be joined with ‘/’ to get the file path relative to the plbenchmark repository)
Ligands
ligands.py Functions and classes for handling the ligand data.
- class plbenchmark.ligands.Ligand(d: dict, target: Optional[str] = None)[source]
Store and convert the data of one ligand in a
pandas.Series
.- derive_observables(derived_type='dg', destination='DerivedMeasurement', out_unit=None)[source]
Derive observables from (stored) primary data, which is then stored in the
pandas.DataFrame
- Parameters
derived_type – type of derived observable, can be any of ‘dg’ ‘ki’, ‘ic50’ or ‘pic50’
destination – string with column name for ‘pandas.DataFrame’ where the derived observable should be stored.
out_unit – unit of type
pint
unit of derived coordinate
- Returns
None
- find_links()[source]
Processes primary data to have links in the html string of the ligand data
- Returns
None
- get_coordinate_file_path()[source]
Get file path relative to the plbenchmark repository of the SDF coordinate file of the docked ligand
- Returns
file path as string
- get_dataframe(columns=None)[source]
Access the ligand data as a
pandas.Dataframe
- Parameters
columns – list of columns which should be returned in the
pandas.Dataframe
- Returns
pandas.Dataframe
- get_html(columns=None)[source]
Access the ligand as a HTML string
- Parameters
columns – list of columns which should be returned in the
pandas.Dataframe
- Returns
HTML string
- class plbenchmark.ligands.LigandSet(target, *arg, **kw)[source]
Class inherited from dict to store all available ligands of one target.
- get_dataframe(columns=None)[source]
Access the
ligandSet
as apandas.Dataframe
- Parameters
columns –
list
of columns which should be returned in thepandas.Dataframe
- Returns
pandas.Dataframe
- get_html(columns=None)[source]
Access the
plbenchmark:ligands.ligandSet
as a HTML string- Parameters
columns –
list
of columns which should be returned in thepandas.Dataframe
- Returns
HTML string
Edges
edges.py Functions and classes for handling the perturbation edges.
- class plbenchmark.edges.Edge(d: dict)[source]
Store and convert the data of one perturbation (“edge”) in a
pandas.Series
.- Parameters
d –
dict
with the edge data- Returns
None
- add_ligand_data(ligand_set)[source]
Adds data from ligands to
edge
. Molecule images and the affinity difference are added.- Parameters
ligand_set –
plbenchmark:ligands:ligandSet
class of the same target- Returns
None
- get_dataframe(columns=None)[source]
Access the edge data as a
pandas.DataFrame
- Parameters
cols – list of columns which should be returned in the
pandas.DataFrame
- Returns
pandas.DataFrame
- class plbenchmark.edges.EdgeSet(target, *arg, **kw)[source]
Class inherited from dict to store all available edges of one target.
- get_dataframe(columns=None)[source]
Access the
plbenchmark:edges.edgeSet
as apandas.DataFrame
- Parameters
cols –
list
of columns which should be returned in thepandas.DataFrame
- Returns
pandas.DataFrame
- get_dict()[source]
Access the
plbenchmark:edges.edgeSet
as a dict which contains the name of the edges as key and the names of the two ligands in a list as items.- Returns
dict
Utils
utils.py Contains utility functions
- plbenchmark.utils.convert_error(error_value, value, original_type, final_type, temperature=300.0, out_unit=None)[source]
Converts an experimental value into another derived quantity with specified unit.
- Parameters
error_value – float, error of val, numerical value
value – float, numerical value
original_type – string, code for the original observable. Can be dg, ki, ic50, pic50
final_type – string, code for the desired derived quantity. Can be dg, ki, ic50, pic50
temperature – float, temperature in kelvin
out_unit – unit of type
pint
, output unit of final_type, needs to fit to the requested final_type
- Returns
pint.Quantity
with desired unit
- plbenchmark.utils.convert_value(value, original_type, final_type, temperature=300.0, out_unit=None)[source]
Converts an experimental value into another derived quantity with specified unit.
- Parameters
value – float, numerical value
original_type – string, code for the original observable. Can be dg, ki, ic50, pic50
final_type – string, code for the desired derived quantity. Can be dg, ki, ic50, pic50
temperature – float, temperature in kelvin
out_unit – unit of type
pint
, output unit of final_type, needs to fit to the requested final_type
- Returns
pint.Quantity
with desired unit