libinteractive: functions related to interactive tasks
Set of functions related to haddock3 interactive rescoring haddock3-re.
- haddock.libs.libinteractive.handle_clt_file(df_ss, clt_ranks_dict)[source]
Handle capri.clt file.
- Parameters:
df_ss (pd.DataFrame) – The caprieval ss data.
clt_ranks_dict (dict) – New cluster ranking dictionary.
Reclustering modifies the cluster data, so capri_clt.tsv must be updated.
- haddock.libs.libinteractive.handle_ss_file(df_ss: DataFrame) → tuple[DataFrame, dict][source]
Manage a caprieval capri_ss file focusing on 4 first elements per cluster.
- Parameters:
df_ss (pd.DataFrame) – The caprieval ss data.
- Returns:
df_ss (pd.DataFrame) – The input dataframe
clt_ranks_dict (dict) – Dictionary with the cluster ranks
- haddock.libs.libinteractive.look_for_capri(run_dir: str, module_id: int) → Path | None[source]
Look for capri evaluation files previous to clustfcc_dir.
- Parameters:
run_dir (str) – Path to the haddock3 run directory
module_id (int) – Id of the module.
- Returns:
capri_eval (Path) – Path to the capri evaluation file
- haddock.libs.libinteractive.rewrite_capri_tables(caprieval_folder: str, clt_dic: dict, outdir: str) → None[source]
Rewrite the capri tables with new values.
- Parameters:
caprieval_folder (str) – Path to the capriveal folder to be changed
clt_dic (dict) – Data for each cluster
outdir (str) – Output directory