WARP to cryosparc to relion


I have picked particles, with CTF estimation and motion correction in WARP. I imported these particles into cryosparc where I did some local CTF refinement and have homogenous refinement/NU refinements from these particles. I am trying to export in order to import into relion to do local classifications. I have encountered an error when copying WARP micrograph coordinates (/star.py:510: FutureWarning: Columnar iteration over characters will be deprecated in future releases.
df[UCSF.IMAGE_ORIGINAL_INDEX], df[UCSF.IMAGE_ORIGINAL_PATH] = ) using cparc2star.py. Althought this still outputs a readable .star file that has the correct coordinates assigned to the particles as checked by eye in a text editor. I can also make a .star file without copying the coordinates from the WARP star file. After imported into relion I get the error ‘box size not available’ after starting a 2D classification job even when --boxsize is specified during csparc2star.py. I am hoping to get into contact with someone who has done this before to see what method you use for this cryosparc to relion conversion.



Hi Emily,
That’s just a warning from a library, no need to worry about it. I will change that method eventually (before that iteration style is deprecated :slight_smile:).

--boxsize corrects the particle origins (not coordinates) if you used a different refinement box size than the particle box size in cryoSPARC, most likely you don’t need/want this argument.

Finally, Relion3.1 is a bit dense about particle box sizes now. I may change the meaning of --boxsize for Relion3.1 output files, but in the meantime you can fix your last error by adding rlnImageSize to the optics_data table at the top of the .star file manually.

Thanks, this worked! I also learned I need to be more thorough combing through threads.

Another small note - I had an error that was thrown both when I used environments made with Miniconda3 or python2.7. Specifically, running the csparc2star.py hit trouble at metadata.py, line 401
ptdf = util.dataframe_from_records_mapped(pt, {**general, **micrograph})
This was alleviated by using Miniconda2 to make an environment that I used during installation and currently use when running pyem python packages. Everything was done as described for Miniconda3 but with Miniconda2-latest-Linux-x86_64.sh instead. This could be anecdotal but worth a mention and possibly worth a try for people getting that error.

Python 3 is required, the {**x} syntax isn’t legal Python 2. You can install Python 2 or 3 environments with either Miniconda (the only difference is that the base environment is 2 or 3 by default).

1 Like