Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cs2star error #8

Closed
SepidehV opened this issue Oct 1, 2023 · 2 comments
Closed

cs2star error #8

SepidehV opened this issue Oct 1, 2023 · 2 comments

Comments

@SepidehV
Copy link

SepidehV commented Oct 1, 2023

  • cs2star version:
  • Python version:3.8.10
  • Operating System:linux

Description

I tried to convert the cs file from CryoSPARC refinement to star file to use it in relion.
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

I started cs2star and then used the cryoSPARC directory and the refinement job number.
This is what I got:
Loading particle data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Loading micrograph data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Cleaning up particle data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Cleaning up micrograph data... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0% -:--:--
Traceback (most recent call last):
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3361, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'rlnOpticsGroup'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/bio21em1/anaconda3/envs/pyem/bin/cs2star", line 8, in
sys.exit(main())
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/cs2star/cs2star.py", line 189, in main
df_mic['rlnOpticsGroup'] += 1
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/pandas/core/frame.py", line 3455, in getitem
indexer = self.columns.get_loc(key)
File "/home/bio21em1/anaconda3/envs/pyem/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc
raise KeyError(key) from err
KeyError: 'rlnOpticsGroup'

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Could you please help me sort this out?

Thanks.
Sepideh

@brisvag
Copy link
Owner

brisvag commented Oct 5, 2023

Hi @SepidehV, thanks for opening the issue! Could you take a look at the changes in #9 and see if it fixes your problem?

You can install that version with:

pip install git+https://github.com/brisvag/cs2star.git@fix/optic-group-missing

@brisvag
Copy link
Owner

brisvag commented Jan 8, 2024

Closed with #9.

@brisvag brisvag closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants