drugforge.docking.analysis.DockingResults

class drugforge.docking.analysis.DockingResults(csv_path=None, df=None, column_names='default')[source]

Bases: object

This is a class to parse docking results from a csv file. Mainly for mainipulating the data in various useful ways.

__init__(csv_path=None, df=None, column_names='default')[source]
Parameters:
  • csv_path (path to csv file) – Optional

  • df (pd.DataFrame)

Methods

__init__([csv_path, df, column_names])

get_best_structure_per_compound([...])

Gets the best structure by first filtering based on the filter_score and filter_value, then sorts in order of the scores listed in score_order.

get_compound_df([csv_path])

get_grouped_df([groupby_ID_column, ...])

The purpose of this function is to get a dataframe with meaningful information grouped by either the Compound_ID or by the Structure_Source.

get_structure_df([csv_path, resolution_csv])

Either pull the structure_df from the csv file or generate it using the get_grouped_df function in addition to what the function normally does it also adds the resolution

write_dfs_to_csv(output_dir)

Attributes

column_names_dict

get_best_structure_per_compound(filter_score='RMSD', filter_value=2.5, score_order=('POSIT_R', 'Chemgauss4', 'RMSD'), score_ascending=(True, True, True))[source]

Gets the best structure by first filtering based on the filter_score and filter_value, then sorts in order of the scores listed in score_order.

As with everything else, lower scores are assumed to be better, requiring a conversion of some scores.

Parameters:
  • filter_score

  • filter_value

  • score_order

get_grouped_df(groupby_ID_column='Compound_ID', score_columns=('RMSD', 'POSIT_R', 'Chemgauss4', 'MCSS_Rank'))[source]

The purpose of this function is to get a dataframe with meaningful information grouped by either the Compound_ID or by the Structure_Source.

Parameters:
  • groupby_ID_column

  • score_columns

get_structure_df(csv_path=None, resolution_csv=None, **kwargs)[source]

Either pull the structure_df from the csv file or generate it using the get_grouped_df function in addition to what the function normally does it also adds the resolution

Parameters:
  • csv_path

  • kwargs