kate-fie / syndirella

Generates and scores synthetically practical elaborations from fragment screens
https://syndirella.readthedocs.io/en/latest/
4 stars 0 forks source link

Error with structuring to_hippo output #47

Open kate-fie opened 5 months ago

kate-fie commented 5 months ago

For base compound: UASUHFYDLOTSPQ-UHFFFAOYSA-N I can't get the to_hippo.pkl.gz... Luckily only 72 elaborations

Traceback (most recent call last):
  File "/data/xchem-fragalysis/kfieseler/syndirella/syndirella/pipeline.py", line 112, in _elaborate_from_cobbler_workshops
    slipper.write_products_to_hippo(uuid=uuid) # only write at the end after placement, to get correct uuid
  File "/data/xchem-fragalysis/kfieseler/syndirella/syndirella/slipper/Slipper.py", line 104, in write_products_to_hippo
    hippo_df = self._structure_products_for_hippo(placements_df=placements,
  File "/data/xchem-fragalysis/kfieseler/syndirella/syndirella/slipper/Slipper.py", line 138, in _structure_products_for_hippo
    hippo_df = self._put_hippo_dfs_together(hippo_dfs)
  File "/data/xchem-fragalysis/kfieseler/syndirella/syndirella/slipper/Slipper.py", line 192, in _put_hippo_dfs_together
    hippo_df_step_last[f'{step}_product_name'] = hippo_df_step_last.apply(self.find_matches,
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/frame.py", line 10037, in apply
    return op.apply().__finalize__(self, method="apply")
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/apply.py", line 837, in apply
    return self.apply_standard()
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/apply.py", line 963, in apply_standard
    results, res_index = self.apply_series_generator()
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/apply.py", line 979, in apply_series_generator
    results[i] = self.func(v, *self.args, **self.kwargs)
  File "/data/xchem-fragalysis/kfieseler/syndirella/syndirella/slipper/Slipper.py", line 173, in find_matches
    similarity = self.calculate_inchi_similarity(row[f'{step + 1}_r{row[f"{step + 1}_r_previous_product"]}_smiles'],
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/series.py", line 1040, in __getitem__
    return self._get_value(key)
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/series.py", line 1156, in _get_value
    loc = self.index.get_loc(label)
  File "/data/xchem-fragalysis/kfieseler/conda/envs/fragmenstein/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3797, in get_loc
    raise KeyError(key) from err
KeyError: '3_rNone_smiles'