Sorry to bother you again.
I tested the example again using the latest scripts, but another error appeared.
the log is here:
(COLLAPSE) [ac1daawz21@login03 COLLAPSE-main]$ python search_site.py data/examples/1a0h.pdb B H363 data/datasets/pdb_embeddings.pkl --cutoff 1e-3 --verbose --num_iter 3
search_site.py:37: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support sep=None with delim_whitespace=False; you can avoid this warning by specifying engine='python'.
pdb_meta = pd.read_csv(args.metadata, index_col=0, sep=None)
Database size: 346005
Iteration 1: 230 new results
Iteration 2: 199 new results
Iteration 3: 872 new results
Traceback (most recent call last):
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 203, in pandas._libs.index.IndexEngine._get_loc_duplicates
File "pandas/_libs/index.pyx", line 211, in pandas._libs.index.IndexEngine._maybe_get_bool_indexer
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index._unpack_bool_indexer
KeyError: '1a0j_A'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "search_site.py", line 123, in
main(args)
File "search_site.py", line 96, in main
results[cols] = results['PDB'].apply(lambda x: pdb_meta.loc[x, cols])
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/series.py", line 4771, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/apply.py", line 1123, in apply
return self.apply_standard()
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/apply.py", line 1174, in apply_standard
mapped = lib.map_infer(
File "pandas/_libs/lib.pyx", line 2924, in pandas._libs.lib.map_infer
File "search_site.py", line 96, in
results[cols] = results['PDB'].apply(lambda x: pdb_meta.loc[x, cols])
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1067, in getitem
return self._getitem_tuple(key)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1247, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 967, in _getitem_lowerdim
section = self._getitem_axis(key, axis=i)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1312, in _getitem_axis
return self._get_label(key, axis=axis)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1260, in _get_label
return self.obj.xs(label, axis=axis)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/generic.py", line 4056, in xs
loc = index.get_loc(key)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
raise KeyError(key) from err
KeyError: '1a0j_A'
Sorry to bother you again. I tested the example again using the latest scripts, but another error appeared.
the log is here:
(COLLAPSE) [ac1daawz21@login03 COLLAPSE-main]$ python search_site.py data/examples/1a0h.pdb B H363 data/datasets/pdb_embeddings.pkl --cutoff 1e-3 --verbose --num_iter 3 search_site.py:37: ParserWarning: Falling back to the 'python' engine because the 'c' engine does not support sep=None with delim_whitespace=False; you can avoid this warning by specifying engine='python'. pdb_meta = pd.read_csv(args.metadata, index_col=0, sep=None) Database size: 346005 Iteration 1: 230 new results Iteration 2: 199 new results Iteration 3: 872 new results
Traceback (most recent call last): File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3802, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 203, in pandas._libs.index.IndexEngine._get_loc_duplicates File "pandas/_libs/index.pyx", line 211, in pandas._libs.index.IndexEngine._maybe_get_bool_indexer File "pandas/_libs/index.pyx", line 107, in pandas._libs.index._unpack_bool_indexer KeyError: '1a0j_A'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "search_site.py", line 123, in
main(args)
File "search_site.py", line 96, in main
results[cols] = results['PDB'].apply(lambda x: pdb_meta.loc[x, cols])
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/series.py", line 4771, in apply
return SeriesApply(self, func, convert_dtype, args, kwargs).apply()
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/apply.py", line 1123, in apply
return self.apply_standard()
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/apply.py", line 1174, in apply_standard
mapped = lib.map_infer(
File "pandas/_libs/lib.pyx", line 2924, in pandas._libs.lib.map_infer
File "search_site.py", line 96, in
results[cols] = results['PDB'].apply(lambda x: pdb_meta.loc[x, cols])
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1067, in getitem
return self._getitem_tuple(key)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1247, in _getitem_tuple
return self._getitem_lowerdim(tup)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 967, in _getitem_lowerdim
section = self._getitem_axis(key, axis=i)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1312, in _getitem_axis
return self._get_label(key, axis=axis)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexing.py", line 1260, in _get_label
return self.obj.xs(label, axis=axis)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/generic.py", line 4056, in xs
loc = index.get_loc(key)
File "/work/home/ac1daawz21/miniconda3/envs/COLLAPSE/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3804, in get_loc
raise KeyError(key) from err
KeyError: '1a0j_A'