Issue with parse_pose_star
This appears to be an intermittent issue. I was helping a collegue get cryodrgn running and when I ran the command:
cryodrgn parse_pose_star run_data.star -o poses.pkl
It produced the following error:
(INFO) (parse_pose_star.py) (22-Nov-24 15:59:57) 221564 particles Traceback (most recent call last): File "/home/mbelouso/anaconda3/envs/cryodrgn/lib/python3.9/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 165, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: '2'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/mbelouso/anaconda3/envs/cryodrgn/bin/cryodrgn", line 8, in
The STAR file culprit can be found here, but to my eyes I can't figure out what the issue is with the input:
https://drive.google.com/drive/folders/1N9iW9_FmWL8yJItNnfdxv_974vAAIPm1?usp=sharing
I have confirmed that in general this works on other STAR files on the same compute platform.
thanks so much guys!
cheers
matt B
Hi Matt,
I believe this error comes from mismatches in the _rlnOpticsGroup numbers. The issue is resolved by setting rlnOpticsGroup to 1 for all particles.
The easiest way to do this without a text editor might be to use relion_image_handler i.e. relion_star_handler --i run_data.star --o run_data_mod.star --operate rlnOpticsGroup --set_to 1 --i_tablename particles --ignore_optics Since rlnOpticsGroup is in both the particle and optics data blocks, you get an error if you don't ignore the optics table, so you'll need to add the optics table back after running this command.