I am trying to convert particles.cs file into particles.star file to process in Relion using csparc2star.py .
I encounter following error:
python3 /data/Cryosparc_user/pyem/csparc2star.py --copy-micrograph-coordinates P4_J21_passthrough_particles_selected.cs P4_J21_passthrough_particles_selected.star
Traceback (most recent call last):
File “/data/Cryosparc_user/pyem/csparc2star.py”, line 120, in
sys.exit(main(parser.parse_args()))
File “/data/Cryosparc_user/pyem/csparc2star.py”, line 38, in main
if args.input[0].endswith(".cs"):
IndexError: list index out of range
I was wondering if someone can help me resolve this issue.
in your command, the flag “–copy-micrograph-coordinates” needs to be followed with your original particles.star file that was imported in cryoSPARC. or if your particles were picked in cryoSPARC, you don’t need this flag.
My particles were picked in Cryosparc and if I run the command without the flag, I see different error now.
(base) [cryosparc_user@delorean J21]$ python3 /data/Cryosparc_user/pyem/csparc2star.py P4_J21_passthrough_particles_selected.cs P4_J21_passthrough_particles_selected.star
I guess this is just a warning, you should still get a .star file. If you want to have star file containing Angular alignment parameters, you should convert .cs file in a refinement job.
Another issue, when I import the .cs to .star converted file in relion I see following error with bunch of missing variables. Is there something I need to specify during conversion?
in: /usr/local/relion-3.1-source/src/jaz/obs_model.cpp, line 198
ERROR:
ERROR: not all necessary variables defined in _optics.star file: rlnPixelSize, rlnVoltage and rlnSphericalAberration. Make sure to convert older STAR files anew in version-3.1, with relion_convert_star.
=== Backtrace ===
relion_import(_ZN11RelionErrorC1ERKSsS1_l+0x47) [0x4cfd17]
relion_import() [0x44073a]
relion_import(_ZN16ObservationModel10loadSafelyESsRS_R13MetaDataTableSsib+0x437) [0x4e0577]
relion_import(_ZN17import_parameters3runEv+0x1177) [0x4a3ba7]
relion_import(main+0x35) [0x49bbc5]
/usr/lib64/libc.so.6(__libc_start_main+0xf5) [0x7fd0ac2f0555]
relion_import() [0x49e7df]
ERROR:
ERROR: not all necessary variables defined in _optics.star file: rlnPixelSize, rlnVoltage and rlnSphericalAberration. Make sure to convert older STAR files anew in version-3.1, with relion_convert_star.
As you mentioned above I converted the .cs file from refinement job and now I see following defocus value not found error. Any suggestion on how to fix it?
python3 /data/Cryosparc_user/pyem/csparc2star.py --swapxy /data/Cryosparc_user/P4/J68/P4_J68_passthrough_particles.cs P4_J68_passthrough_particles_swapxy.star
Defocus values not found