Replicating legacy local refinement results in Cryosparc v4.3.1

Dear all,

I am trying to replicate the results of a local refinement (legacy) job in cryosparc v2.15 I ran a long while ago using the new implementation of the job in cryosparc v4.3.1. However, while I could reach around 3.6 Å using the legacy refinement, using the same particle set, mask and starting alignments and references (same and similarly generated), the new local refinement results are limited to sub-4.2 Å and often over-fitted.

I have tried many different combinations of parameters including changing rotation/translation extents, using prior and enabling dynamic masking, but I cannot seem to be able to replicate the old results.

I see from this post from March 2021 (Search range in Local Refinement (Legacy)) that disabling priors and fulcrum recentering, and enabling dynamic masking should result in the same behaviour as the legacy job, but it doesn’t seem to be working for me.
I would appreciate any help in figuring out the the “correct” set of parameters to replicate the legacy behaviour.

Relatedly, is it possible to have a second installation of cryosparc (say v2.15) alongside the latest cryosparc version in a single worksation? If yes, how could I do that in a way that doesn’t interfere with the current cryosparc installation?

1 Like

(Couldn’t post multiple pictures in the original post, so…)
Here are the parameters I was using originally in the legacy local refinement:

Yes, but one must be extremely careful. In brief, ensure:

  1. distinct port ranges
  2. independent database directories
  3. no overlap (or switching between instances) of project directories
  4. distinct license ids

A little more detail:
The download of older versions of CryoSPARC is described in Installing an older version - #4 by nfrasser. Elaborating on the precautions mentioned already:

  1. Overlaps between the two instances’ port range may (probably: will) result in database corruption and other problems. (install.sh parameter --port)
  2. Each instance requires its own database directory. (install.sh parameter --dbpath)
  3. On a CryoSPARC v2 or v3 instance, do not import or otherwise access a project directory that is registered (in active, attached or archived states) on a v4 instance. Detach that project from the v4 instance first. There may be no safeguards against violating this rule, but the probable consequences are database corruption and data loss.
  4. You may request an additional license id.

In summary: running two or more CryoSPARC instances on the same computer is possible given appropriate precautions.

1 Like

Hi @BhattaArjun2p! We have a few questions about the parameters you set for the job in 4.3.1.

First, could you let us know what fulcrum you set for the new refinement? It looks like your fulcrum is set to (162, 169, 93) in the old job and we’re wondering if that was set the same way in the new job.

Second, could you explain how you determined that 0.01 was the optimal threshold for the dynamic mask, and whether you used the same threshold in the new job? If so, could you post a picture of what each mask looks like?

Hi @rposert!

I also used the same fulcrum in the new refinement job (162, 169, 93), and in the volume cross-section images output during the refinement, the fulcrum seems to be positioned where I would expect it to be.

The threshold of 0.01 for dynamic masking was determined by trial-and-error. The original job was run in the local refinement version where “static” masking wasn’t implemented, and even if chosen as a parameter would be ignored by the local refinement job (also discussed in this thread). The rationale for using such a low threshold for dynamic masking was that my region of interest was very flexible with respect to the “core” that the NU refinement was predominantly aligning to, meaning the blobby density of my ROI would only be “visible” at low threshold. The default dynamic masking parameters, were shrinking the input mask dramatically in the first couple iterations because a significant portion of the ROI was below the default 0.2 (or was it 0.1?) threshold. With 0.01, the input mask was being dilated every iteration in the regions there were largely ordered, but the final refinement mask didn’t extend too far beyond the inital input, and also gave me the best results among the values I tried.

Here’s what the refinement masks from the final iterations look like:
Legacy job:
image

New job where I tried to replicate:
image

It seems, with the same dynamic masking parameters, the “new” mask looks much wider than the old one.

Perhaps, using the “old” final refinement mask as a static mask in the new job will yield a comparable result? I will give this a try and let you know.

1 Like

You might also try using volume alignment tools to recenter on the mask prior to local refinement. Sometimes this seems to make a difference even without re-extraction, for reasons I am not entirely clear on.

4 Likes

Hi @rposert and @olibclarke!

So just using the final refinement mask from the old job did not improve the results, but recentering on the mask (the fulcrum coordinates) with the Volume Alignment Tool before local refinement, as @olibclarke suggested, resulted in a dramatically improved reconstruction: nominally from ~4.2 to ~3.3 Å (even beyond what I got in 2.15).

The refinement parameters in the two jobs were identical except that first job (without recentering) had the fulcrum at 162,169,93 and the second job (with recentering) had the fulcrum at the box center.

So, it seems this discrepancy has to do with the center of the particles alignments and/or the consensus map. I had assumed that particle alignments and the initial map were internally transformed to be recentered on the fulcrum coordinates during local refinement. It was quite surprising that explicitly recentering before local refinement had such a dramatic effect. I would be curious to know why this might be.

Anyway, the issue seems to be solved with recentering on the fulcrum before local refinement. Thank you very much for the suggestion, Oli!

1 Like

Glad to hear it helped! We have also seen similar results, and I am also a little puzzled as to why explicit recentering (without re-extraction) can make such a difference. @rposert, thoughts?

Hi @BhattaArjun2p ,

Thank you for detailed reports on this case, this is certainly interesting to us. It is currently not obvious to us why recentering vis volume alignment tools, without re-extracting, could make such an impact on the results, although this tip is good to know.

To help us look into this further, could you confirm that the only difference in the particles from the left and right local refine jobs above was the use of volume alignment tools, and that re-extraction was not done?

If that is the case, as a follow-up, would you be open to sharing particle images to help us try to reproduce this phenomenon internally?

Many thanks,
Michael

4 Likes

Hi @mmclean ,

Yes, that is correct! I did not re-extract the particles - I only used the volume alignment tools on the original particle alignments and reconstruction.

We would be happy to be of help in solving this issue. If it is possible, we could directly chat to discuss the details.

Best,
Arjun

Hi, I’m interested in that volume alignment tools, but I’m confused about the use of this tool. I just input the volume,mask and particles which from the Local Refinement. I want to know how to determine Re-centering Parameters. :thinking:

You can use Chimera with the measure center command to identify the coordinates corresponding to the center of the mask. Or you can place a marker (ac mc) at the desired coordinates (if they do not correspond to the mask center) and recenter on these coordinates instead.

1 Like

Thank you for your answer. But What is the difference between this way “measure center” and Local Refinement>Override fulcrum coordinates? They seem to have taken the same approach to locate the mask.

Yes, you can also get the center of the mask from the log of local refinement - either way is fine

You may have misunderstood my meaning. I mean that the location of the mask is provided in Local Refinement>Override fulcrum coordinates, If I provide another same location in the volume alignment tools, which is optimized? Mask or Volume? The volume alignment tools does not seem to increase the volume of output from Local Refinement. The mask doesn’t seem to have changed at all.

it isn’t optimizing anything - just recentering the mask, volume and particles at the coordinates you provide

Thank you very much for your answer. It seems that once I provide a definite coordinate in local Refinement>Override fulcrum coordinates, I don’t need to recenter the mask, volume or particles. Thanks again for your clarification and for letting me know more about volume alignment tools.

Right - to be clear though, these are different things, that in some cases will give quite different results