Csparc2star.py not working for file generated by cryosparc3.1

Hi,
I am trying to use csparc2star.py to convert particles cs file to star file. I pick the particles and import the star file from warp. After obtaining a clean stack, I did a homo-refine and exported the job. I am planning to convert the .cs file and combine the coordinate from warp star file to dod polishing in relion.
However, when I use csparc2star.py to convert the file, it will raise the following error:
csparc2star.py P77_J82_particles_exported.cs particles_test.star
ValueError: Columns must be same length as key

Required fields could not be mapped. Are you using the right input file(s)?

I tested the same command on the . cs file generated by cryosparc 2.14 in before. It works fine and correctly converted the .cs to the .star.
I am not sure what’s the problem.
I am appreciate the help.

update:
The problem seems to be specific to exported job. I directly go to the cryosparc job folder and covert the .cs + passthrough file(csparc2star.py cryosparc_P77_J82_005_particles.cs P77_J82_passthrough_particles.cs particles_test.star ), then it works.
it will not work if I export the job and convert.

Hi here,
I ran through the same problem and even if I tried to do it directly from the job folder is giving me the same error message:
ValueError: Columns must be same length as key
Required fields could not be mapped. Are you using the right input file(s)?

Could somebody help me solve this issue, please? I did it before with other projects and it was working fine.
Thanks a lot!

I found that in some jobs (at least in Export job and Downsample particles job) the output .cs file can have both alignments2D/class_posterior and alignments3D/class_posterior fields, which causes the ValueError.

If it is the case then this modified version of PyEM may help you.

Thanks @kttn ! that’s exactly what happened. An easier workaround that I found is to delete the alignments from the particles input of the extraction job before starting it. And leaving just location and passthrough. Then running the job and transforming to star. image|690x102

1 Like