Import Bayesian Polishing shiny.star file into cryoSPARC

Hi all,
I am having an issue with importing my Relion Bayesian Polishing output (shiny.star) into cryoSPARC, in order to complete a final round of 3D Refinement. I am importing my shiny.star file using the Import Particle Stack job, and specifying the path to my shiny.star file in the field Particle Meta Path (I am leaving the Particle Data Path blank for this job). The issue is that the job runs successfully to completion, however the imported particle images appear as follows:

Furthermore, the job output reads as follows (see my comment in the thread below):

I tried to perform 2D classification to remove the images that are only vertical/horizontal lines, however ever the remaining particles have extremely poor resolution. I had used this set of particles to make an initial 3D refinement of ~3.5 A, and was trying to improve it using the Bayesian Polishing in Relion.

Lastly, I tried to perform a CTF Refinement (beamtilt & trefoil) in Relion, before importing these particles in to cryoSPARC (using the same method outlined above), however the imported images still appear similar to the ones shown earlier.

I noticed in the job log there is only one warning (“Warning: No micrographs were connected as inputs, so correspondences cannot be found, so output will not contain pick locations for particles.”), so I’m wondering if my issue is somehow related to this message?

Thank you for your input!

-Shawn

Hi Shawn,

It may be helpful to provide a little more info about your workflow. Did you start off in cryosparc and then go to bayesian polishing? If so, did you verify that your particle coordinates matched up between relion and cryosparc? Looking at these I would guess you have an issue in coordinate conversion, and so your polishing was performed at non-particle locations on the micrograph.

Cheers
Oli

Hi Oli,

Thanks for your message. My general workflow was as follows: import raw movies into Relion and use Motioncorr2 wrapper in Relion to complete alignment. Then, import aligned micrographs in to cryoSPARC. Then, perform CTF estimation, followed by template picker for particle picking, multiple rounds of 2D classification, and lastly ab initio map generation, followed by 3D homogenous refinement. I then exported my particles and converted to a star file using the pyem csparc2py script. In Relion, I performed Bayesian Polishing to generate the shiny.star file.

What’s the quickest way to compare particle coordinates between Relion and cryoSPARC? I compared the coordinates in the .star file generated from csparc2py with the coordinates in the shiny.star file generated from Bayesian Polishing and spot checked a few by eye. They match up, but I’m wondering if I am missing some information?

Best,
Shawn

I would like to check the particle coordinates in the .cs file generated from the final round of 2D classification (however, am having trouble reading this file type). This would include all 200,000 particles that I used for the homogenous refinement.

I believe the problem is you need to use the --swapxy flag in csparc2star.py for particles extracted in cryosparc. I often do a quick test of the coordinates by extracting a small subset of particles (1k) in relion based on the homo-ref star file from csparc2star, then take these to 2D class.
More on this here, just ignore my comments on flipping an axis as I was mistaken.

1 Like

Hi user123,
I tried what you described with the file I had generated (without the --swapxy flag) and the particles do appear correct. They have the expected size, shape, etc. Do you have any other ideas as to why I am experiencing the original issue I described?
Cheers,
Shawn

Hi Shawn,
The original particle image you posted looks like non-particles as Oli mentioned. Do your original particles look like this?
Have you tried it with the --swapxy flag? I am almost certain it is needed unless that was changed in some recent update. I would do a quick test - make the new _swapxy.star file, edit as needed and make sure it points to your original micrographs with star.py, then import to relion and subset select 1k particles, run an extraction job in relion using one of the subset select files (I bin to 5A here to make it faster), import to cryosparc and run 2D classification. Do the same with the non-swapxy.star and compare the 2D classes.
Other than that, if you are sure the coordinates are correct, I might look at the polishing settings, but I am not too familiar with whether these can have such a drastic effect on the output. I’ve forgotten the swapxy flag quite a few times and often deal with the pain of going back to get the proper coordinates later on. That’s where I would check first.

Hi user123,
Thank you for being insistent on this! You were totally correct (as was, @olibclarke). This was a really helpful insight, and will definitely be something I keep my eye out for in the future.
Cheers,
Shawn

FYI --swapxy is typically required if the original motion correction is done outside cryoSPARC and the summed micrographs are imported rather than movies. For example, with on-the-fly drift correction using MotionCor2. This is the only case I’m very familiar with, so I also provided the --invertx and --inverty options so that every possible convention can be produced with the right set of these 3 options.