Import data back into relion

Hi everyone!

I imported particles with partially subtracted signal into cryoSPARC v2 and did some ab initio reconstructions, just to see if cryoSPARC does a better job in separating small differences (and it seems to be the case). And I was trying to import the particles back into relion to refine separate classes that I got in cryoSPARC. I used csparc2star.py, adding --copy-micrograph-coordinates. It’s not optimal already since in the _rlnImageOriginalName it writes the path to cryosparc data instead of non-subtracted images (is there a way around it?) But the problem is that as I import this converted file into relion and try refining, the results don’t make sense.

This is the header of the converted file:
data_images

loop_
_rlnAnglePsi #1
_rlnAngleRot #2
_rlnAngleTilt #3
_rlnClassNumber #4
_rlnCoordinateX #5
_rlnCoordinateY #6
_rlnCtfFigureOfMerit #7
_rlnCtfMaxResolution #8
_rlnDefocusAngle #9
_rlnDefocusU #10
_rlnDefocusV #11
_rlnDetectorPixelSize #12
_rlnImageName #13
_rlnImageOriginalName #14
_rlnMagnification #15
_rlnMicrographName #16
_rlnOriginX #17
_rlnOriginY #18
_rlnPhaseShift #19
_rlnRandomSubset #20
_rlnSphericalAberration #21
_rlnVoltage #22

and this is the header of the original file that I imported into cryosparc:
data_

loop_
_rlnCoordinateX #1
_rlnCoordinateY #2
_rlnClassNumber #3
_rlnAutopickFigureOfMerit #4
_rlnAnglePsi #5
_rlnImageName #6
_rlnMicrographName #7
_rlnMagnification #8
_rlnDetectorPixelSize #9
_rlnCtfMaxResolution #10
_rlnCtfFigureOfMerit #11
_rlnVoltage #12
_rlnDefocusU #13
_rlnDefocusV #14
_rlnDefocusAngle #15
_rlnSphericalAberration #16
_rlnCtfBfactor #17
_rlnCtfScalefactor #18
_rlnPhaseShift #19
_rlnAmplitudeContrast #20
_rlnOriginX #21
_rlnOriginY #22
_rlnGroupNumber #23
_rlnAngleRot #24
_rlnAngleTilt #25
_rlnNormCorrection #26
_rlnLogLikeliContribution #27
_rlnMaxValueProbDistribution #28
_rlnNrOfSignificantSamples #29
_rlnRandomSubset #30
_rlnBeamTiltX #31
_rlnBeamTiltY #32
_rlnImageOriginalName #33

Did anyone have a similar problem?

We worked around it by doing this tail -n +26 csparc_converted.star | cut -f 13 -d ’ ’ | xargs -I % grep -F % original_file.star > new_file.star to just copy the exact parameters from the original file before cryoSPARC import, but what exactly is the issue?

Thanks in advance for your help!
Valeria

I got the similar results: relion didn’t repeat the model with exactly same particles came from cryoSPARC, it’s ugly and took too much long time to do it.

@Lerche do you have beam tilt? That’s the only parameter that could matter. Unfortunately there’s not really a way for me to recover the original rlnImageOriginalName field, however you can merge it in using star.py --merge-key <keys> --merge-fields <fields> --merge-source <old star file> from_csparc.star new.star.

Keys can be a comma-seperated list of fields for matching e.g. rlnMicrographName,rlnCoordinateX,rlnCoordinateY and fields can be the fields you want to copy from the old star file, e.g. rlnImageOriginalName.

The way you did it with awk is a bit dangerous since cryoSPARC will probably have re-ordered the particles.

Reconstructions in cryoSPARC and Relion using the same angles and shifts should look almost the same, so if it looks worse something is probably going wrong. Also remember that relion_reconstrcut doesn’t marginalize over angles, so the output from relion_refine will always look better/smoother.

@DanielAsarnow Yes, the beam tilt was on.

Thanks for the tip, I just compared a few particle labels/coordinates by eye and it seemed the same, so I assumed the numbering was what it used to be.

Well that’s the funny thing, with relion_reconstruct I could get the map that looked like what it’s supposed to be, just not very smooth. And here is the output from relion refinement job -


Ok, I only let the job run for a few iterations, because with every iteration the results were getting worse, and even though initially the resolution went down a bit, it went back to 20 - 22 A.

OK, it sounds like everything is working correctly since relion_reconstruct works as expected.

Did you configure your refinement for local searches? If the “Initial angular sampling” and “local searches from angular sampling” parameters (3D refine > Auto-sampling) are not set to the same value, then Relion will discard your input angles and start from a global search.

Also, are you using a mask in Relion, and what is the low-pass of the reference? What does the map from relion_reconstruct look like? You could send an image of a small part if you don’t want to share the whole density.

I did not change anything in the sampling tab in relion. The low-pass of the reference is 40 A, and no, I didn’t use the mask.
Here is the relion_reconstruct result.

I did not change anything in the sampling tab in relion.

Then Relion is not using your initial angles from cryoSPARC at all. It is a doing a new global search, and for whatever reason, failing badly.

If you want Relion to search around your input angles you need to either set the initial angular sampling and local angular sampling to the same value (auto-refine) or check “local angular searches” (3D classification).

If you want a new global search and are confused by the poor quality, then it’s probably wrong masking options (check particle diameter, try mask with random noise) or something procedural like wrong particle paths or order, or you need to re-extract in order to recenter the particles.

Thanks for the tips. I tried your suggestion with changing the angular sampling, it did look better than my initial refinements, but still not optimal. I guess I would have to go back to the original images

You could re-extract the particles in Relion (to recenter and normalize), provide the reconstruction you sent above as the initial reference, employ a less aggressive initial low-pass (say 4 - 6 Å), and start from a relatively fine sampling (set both angular sampling parameters to 1.8˚, translational step to 0.5, radius to 3).

Also, try both masking with zeros and random noise. One or the other can be much better than the other. Make sure you make a good soft mask from the reconstruction you sent, too, and use the solvent flattening option.

1 Like