Focused refinement?

Hi,

When I provide a mask that covers only part of the particle (with the intention of focusing refinement on a single region of the assembly), refinement does not proceed well - it converges at low resolution after two iterations, and the resulting map looks odd. This is for a dataset and mask that refine well to high resolution in relion with local angular searches. Is this the expected behaviour at present, or am I doing something wrong?

Cheers
Oli.

Hi Oliver,

Great question. The results you got (poor resolution after local masking) is the expected behaviour in the current cryoSPARC version (v0.2.47). The reason is actually interesting; in cryoSPARC we never perform local searches for orientation or translation (we use the branch and bound approach instead) so at each iteration of refinement, we’re doing a global pose search for the orientation of the masked reference relative to the entire particle image. This is definitely the wrong thing to do in local refinement, since a big chunk of the reference structure has been masked out so only local searches of pose can be trusted. We’re working on implementing this soon, so it’ll probably be wise to re-refine your data when that is done.

Ali

Ah, I wondered if it was something like that, thanks Ali - I’ll look forward to trying out local refinement when available then!

Cheers
Oli

Hi Oli,

Is the local refinement available now??
Really looking forward to that!
Thank you:)
Wenfei

Hi @wenfei , Not yet that I can see, but I’m just a user - you’d need to ask @apunjani :slight_smile:

Oli

I see~
Thank you for the kindly reply:)

Hi Ali,

I want to do focused refinement but I know currently we couldn’t do it with cryosparc.
Do you know if there is a way to use the mrc files generated from cryosparc to run local refinement in RELION?
We know the input for RELION is star file. And I have no idea if there is a way to communicate with RELION.

Cheers,

Wenfei

1 Like

Hi Wenfei,

Thanks for the feedback - we are indeed working on local refinement and hope to have it out soon.

For now you can convert a cryoSPARC csv file to star format using the instructions in this forum topic:

Hope that helps,
Ali

1 Like

Hi @apunjani ,

Assuming that focused refinement is still on the roadmap, I’d like to suggest an enhancement to consider - Automated mask optimization (or even better, ab initio identification of appropriate masks).

Identification of an appropriate mask for local refinement is still kind of tedious, and often requires trying multiple different options, trading off between the rigidity of the enclosed subregion and having sufficient signal for alignment.

Any way to either optimize a user supplied mask to maximize the resolution of the resulting reconstruction or identify subregions in the original refined volume that would locally improve with focused refinement would be very handy indeed!

Cheers
Oli

1 Like

Hi Wenfei,
I am having a similar issue where heterogeneous refinement gives a nice map, but the same is not replicated when I process the data from Relion. So, I am also looking for a guide on how to export files from Cryosparc to Relion for doing the focused refinement. I looked into the csparc2star.py script from Pyem, but still clueless which files to import and other parameters. It would be generous of you, if you were successful in doing that and guide me so.

Thank you.

-Zuhaib

Hi Zuhaib,

You want to use the csparc2star.py script from pyem. This takes a metadata file (from either heterogeneous or homogeneous refinement in cryoSPARC) and converts it to a star file that you can use in relion. Run it like:

csparc2star.py in.csv out.star

Does that make sense? There are no other parameters to set, unless you want to re-extract the particles from the original micrographs, in which case you will want to use the --copy-micrograph-coordinates flag, with the star file that you originally put into cryosparc (which has the particle coordinates that are lost during conversion to the cryosparc metadata format).

Cheers
Oli

Hi Oilbclarke,
Thanks for the prompt response! Here is short run-down of what I did in cryosparc that gave me some density for a flexible region in a complex. Feed in the extracted particle star file, did 3-class ab initio, a 2d-classification, run a 3-class heterogeneous refinement, and finally a homogeneous refinement and sharpening. I was able to generate a star file from the last homogeneous refinement metadata file. I used an older pyem. Our current modules are having some compiling issues with the latest built. Now should I just import the file using “import” option in relion and then do 3d classification? Or do I have to do import, extract, 2d and 3d?

Thanks!
Zuhaib

Hi Zuhaib

You can import directly and perform 3D classification. You only need to re-extract if you want to recenter the particles, or if the particles you fed into cryosparc were binned.

If you already have some density for the region of interest, and you just want to sort which particles have that density and which do not, you may want to perform a 3D classification skipping alignments, with a mask around the region of interest and a decent number of classes (~8-12). Just remember if you do this, you’ll want to increase the regularization parameter T - I often find 100-400 is a good range in such a case.

Cheers
Oli

Hi olibclarke,

I tried importing the star file (using import>node type: particle star file) and ran the 3d classification. I am getting a very trivial error (ERROR: Cannot read file Extract/job019/Micrographs/20180730_1020_A014_G000_H070_D002_DW_frames_DW.mrcs It does not exist). Probably something do to do with the directory structure.

Yes - check your star file, and check that the relative paths match where your extracted particle stacks are located. If they don’t, edit them to match.

Cheers
Oli

Seems to be working now! A side query, the box size parameter in Relion now should be independent of the voxel size I gave in cryoSPARC, right? I mean I can give 360 box size, although I gave 128 in voxel while processing in cryosparc?

The box size in relion should be the box size of your particles (which I assume is 360 in this case).

The box size in heterogeneous refinement in cryosparc is arbitrary - you can bin back to a smaller box on the fly to speed things up (the default is 128).

Just remember that if you are using volumes from cryosparc as initial models for classification in relion, you will need to adjust the box size and voxel size of those volumes to match (for example, using relion_image_handler).

Cheers
Oli

Thanks for the suggestions. Yes, I was directly using the sharpened map as reference for 3d classification. I would now use my pdb2mrc generated map (with Box of 360) to get a reference for Relion. I believe it should work.

Thanks!
-Zuhaib

Seems to be working! Thank you. I have a slightly different question now, if I may!
Usually, when I process through Relion, I do focused masking making a mask of the whole complex except the flexible region. Then proceed to signal subtraction (with the input being the _data.star file from a refinement run in Relion). After the subtraction, I do the 3d classification without image alignment and use a higher T-value.

So, how should I proceed in this case. I think the csparc2star generated file won’r work as an input to signal subtraction.

Hi Zuhaib

That strategy should work fine. The star file from cryosparc should have the orientations you require for reconstruction and signal subtraction.

However, I would also suggest trying classification without alignments (using the orientations from cryosparc) and a focused mask (without signal subtraction). I have found this to work very effectively in many cases.

Cheers
Oli