Recentre and crop after particle subtraction

I want to export a particle stack for some downstream processing out of cryosparc.

I’m looking at one region in particular, which is about 25% the size of the total particle size. I did some local refinement on a subtracted particle stack and that’s working out.

I’d like to crop the subtracted particle out from the larger particle size, if possible. Otherwise there solvent and noise surrounding the small domain I’m analyzing.

Is there a way to do this in cryosparc?

Hi @Geoffrey!
Unfortunately there isn’t a simple built-in way to recenter /crop right now but you could manually change the particle coordinates in the .cs files by using the alignments3D/shift parameter (which is in pixels) to recenter. We have recentering+re-extraction on the feature list for the next version.

Hi is this feature meanwhile implemented? I am having a fairly elongated particle and I want to foxus after subtraction only on the tip.

recentering using alignments from refinement is supported in 3.1 and works well - haven’t tried this, but if you do a local refinement with mask around the tip and then re-extract those particles with re-centering I think that should do what you want

1 Like

Ah I forgot to mention that my particles are subtracted so reextract would not help. Simply cutting the box is what I am looking for.

Hi all,

The current re-centering procedure only operates on the “residual” shifts that are written out during the refinement, and for local refinements, these don’t actually include the (potentially much larger in magnitude) shifts that will push each particle such that the fulcrum is centered.

For this specific workflow, i.e. re-centering of a volume and associated particles on an arbitrary center, we’re planning on adding a new utility job that can do this in a future release. Theoretically this could be done with scripting, and I believe that there may be some code in pyem that does this exact thing but @DanielAsarnow would have to confirm.

Best,
Michael

1 Like

@mmclean You could just add another switch to disable replacing the particles and box on the original center. (I do love the automatic inverse transformation however).

And yes, pyem does have code for arbitrary transformations of particles and volumes, for applying the derived shifts to particle coordinates, and for cropping during subtraction. It’s most useful for focused refinement of symmetry-expanded monomers in large, high-symmetry assemblies. I wrote it for a friend who has a 30nm D12 object; a stack of 24 million 128px monomers is much easier to handle than with the original 1024+ px box size.

Dear users,
Sorry to piggy back on this thread but it seems like the most relevant thing I have come across to my question! I also have a 20nm D12 object where I am trying to do focussed classification and symmetry expansion to look for differences between monomers. I symmetry expand following auto-refine in Relion and signal subtract everything except the masked region of interest, using a quick relion_reconstruct to check that this has worked. Relion 3.1 offers the option to subtract centering on the mask of the area you want to keep and with a new (smaller) box size, but the problem is I would need to do the same with the mrc reference volume to run the classification. My question is, would this workflow make sense? I would not be re-aligning the images, so to me it does not make sense to work with large box sizes that are mostly subtracted signal, but perhaps I am missing something fundamental here? If it does make sense, could you point me to the pyem code? Thankyou very much for your help, Rhian

Since you have already used the similar recenter/crop capability now adopted in Relion3.1, the easiest thing to do is just use your reconstruction of these subtracted/cropped particles as the reference for further processing.

The Volume Alignment Tools utility, introduced in v3.3.1 (released December 1, 2021) supports this functionality. Please see https://cryosparc.com/updates for more details.

1 Like

Hi @spunjani, is there a detailed workflow described anywhere in terms of how to use volume alignment tools to recenter and re-extract in conjunction with signal subtraction, especially in a context where one wants the subtracted particles in a smaller box?

I guess it would be:

1: Use Volume Alignment tools to recenter on region to be kept.
2: Re-extract in smaller box around region of interest
2: Homogeneous reconstruction in smaller box
3: Particle subtraction with soft mask around everything to be subtracted

Is that more or less it?

Cheers
Oli

Hi @olibclarke,

There isn’t a tutorial covering this specific workflow but we’ll consider adding some more detailed info to the volume alignment tools documentation. For this workflow, what you wrote looks like the only way you’d be able to accomplish signal subtraction + cropping. I’d caution you on cropping the box too small though: since the CTF delocalizes the projection of the protein, cropping too closely such that some of the masked region is cropped out (rather than just solvent being cropped out) will mean that the subsequent subtraction job won’t actually remove everything.

Ideally subtraction is done at a larger box size, before cropping is done… but unfortunately we don’t have a tool to crop particle images after they’ve been extracted. This would definitely be useful though (internally it’s come up once or twice as something of interest) and we have it on our radar.

Best,
Michael

3 Likes

right - that is kind of what I was getting at… it would be useful to have a tool to crop particle images post extraction for exactly this purpose. Thanks for the clarification!

Hi @spunjani, @mmclean and @olibclarke

I have performed local refinement (without subtraction) in cryosparc v3.2 and would like to try and improve the resolution further by shifting the particles, mask and output from local refinement to the centre of the box. Do I understand correctly that this new tool in v3.3 will shift all 3 inputs into the centre of the box if I specify x, y, z 3D coordinates as 0,0,0? Presumably it can then be followed by a very local refinement. I don’t require cropping as the box size is already small.

Hi @lizellelubbe yep you can do this now! Use the Volume alignment tools utility (specifying the current location of the desired center, not 0,0,0), then re-extract and run local refinement.

Cheers
Oli

1 Like

Okay, that’s great! Is the re-extract just necessary so that you have the correct box size surrounding each particle after shifting?

right - you don’t need to re-extract necessarily, but you may want to if your sub-particle is towards the periphery of the original box.

Cheers
Oli

Okay, excited to try it out. Thanks for the help :slight_smile: