Image pixelsize issue in passthrough cs to relion star

Hi, afrer “Select 2D” in cryosparc, I tried to convert the passthrough file into relion format. But there is a issue (see below) for image pixelsize. Anyone could help me? Thank you!

Jianhao

$ csparc2star.py P9_J165_passthrough_particles_selected.cs P9_J165_passthrough_particles_selected.star --loglevel debug
Detected CryoSPARC 2+ .cs file
Reading primary file
Converting normalized particle coordinates to absolute
Converted particle coordinates from normalized to absolute
Assigning parameters 2D classes or single 3D class
Directly copied fields: rlnPhaseShift, rlnDefocusAngle, rlnAmplitudeContrast, rlnMicrographName, ucsfUid, rlnDefocusU, rlnSphericalAberration, rlnOpticsGroup, rlnVoltage, rlnCtfBfactor, rlnDefocusV, rlnCoordinateX, rlnCoordinateY, rlnRandomSubset, rlnOriginX, rlnOriginY, rlnAngleRot, rlnAngleTilt, rlnAnglePsi, rlnClassNumber, rlnMagnification
Converting DEFOCUSANGLE from degrees to radians
Converting PHASESHIFT from degrees to radians
Changing RANDOMSUBSET to 1-based index
Changing CLASS to 1-based index
Converting Rodrigues coordinates to Euler angles
Converted Rodrigues coordinates to Euler angles
Traceback (most recent call last):
File “/home/l/app/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 2646, in get_loc
return self._engine.get_loc(key)
File “pandas/_libs/index.pyx”, line 111, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/index.pyx”, line 138, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/hashtable_class_helper.pxi”, line 1618, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas/_libs/hashtable_class_helper.pxi”, line 1626, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘rlnImagePixelSize’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/l/sw/pyem/csparc2star.py”, line 114, in
sys.exit(main(parser.parse_args()))
File “/home/l/sw/pyem/csparc2star.py”, line 79, in main
df = star.check_defaults(df, inplace=True)
File “/home/l/sw/pyem/pyem/star.py”, line 621, in check_defaults
df[it[0]] = df[it[1]] * df[Relion.IMAGEPIXELSIZE]
File “/home/l/app/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py”, line 2800, in getitem
indexer = self.columns.get_loc(key)
File “/home/l/app/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py”, line 2648, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File “pandas/_libs/index.pyx”, line 111, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/index.pyx”, line 138, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/hashtable_class_helper.pxi”, line 1618, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas/_libs/hashtable_class_helper.pxi”, line 1626, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘rlnImagePixelSize’

cryosparc is v2.15.0 and csparc2star.py is the latest update.

You should use csparc2star.py <particles.cs> <passthrough.cs> <output.star> to get the information from both files. I think that’s why there is an issue.