Exporting as a star file



tried following instructions from below but having some issues.

After a 2D run I copied particles_selected.star to the same folder as particle stack (mrcs) and star files that went into cryosparc to begin. After inputting the command below I get the python error “unexpected keyword argument ‘signature’”.

csparc2star.py --copy-micrograph-coordinates particles.star --stack-path particles.mrcs particles_selected.cs cryosparc_output.star


solved. I was using the wrong version of python. Updated 2.7.9 to 2.7.13 and it worked.


Great. It’s actually the wrong version of numpy, not Python, but it must have been upgraded along for the ride.


hi again. Still not getting this to work. When I run the command I get an output file containing the parameters below. The script I think messes up, because I can’t re-extract those particles in relion. I repeatedly get errors about the particle “being outside of the micrographs”. I go looking for the particles in the csparc2star output and some X coordinate values may have decimal places shifted because values are in the range of 20000 pixels.

Also, I take it it’s not possible to also get the shifts and rotations per particle? Although it may not be the goal to have data moved between different programs, a cryosparc guy option to “export data” would be a phenomenal improvement. Thank you.

_rlnCoordinateX #1
_rlnCoordinateY #2
_rlnDetectorPixelSize #3
_rlnImageName #4
_rlnImageOriginalName #5
_rlnMagnification #6
_rlnMicrographName #7


I think I may have solved it again. I did not use the “passthrough” option when extracting. Is there a good wiki or something for using this script? Had no idea this flag was so important.


if anyone happens to see this thread, I still have a few questions…

  1. after running csparc2star can the output be used directly in relion? I am getting weird 3D results in relion and suspect it may have to do with normalization of the particles. Does anything further need to be done after using the script?

  2. is it possible to recover particle translation and rotation using this script?

thanks again!


@orangeboomerang converting alignment parameters for use in Relion is the primary application of the program. The input needs to contain the parameters in order for them to be converted. Look at the fields associated with your particles in cryoSPARC (or just use a refinement…).

You can also recover the coordinates for re-extraction. This requires either a passthrough file, for extractions from cryoSPARC, or an original .star file with coordinates (--copy-micrograph-coordinates) for particles imported from Relion.

If you want Relion to ignore normalization errors, add --dont_check_norm to the extra command line arguments. You could also re-extract the particles using Relion, which will let you re-center them (i.e. subtract origins from coordinates). Centering will help both Relion and cryoSPARC with refinements.