Mask edge artefacts

Hello,

I am trying to troubleshoot some artefacts that I see when using Local Refinement. I have noticed two problems which may be related:

  1. Around iteration 2 or 3, there is a strong rippling effect (alternating positive and negative signal) that is apparent in the real space slices, around the boundary of my mask. This is apparent in the real space slices and not in the masked slices, so perhaps it isn’t actually a problem.

  2. Usually the highest magnitude signal in my finished map comes from noise in the form of radial streaking around the edges (where there is likely no protein or ordered solvent). In some cases I have also seen an artificially inflated gold-standard FSC curve which I can only guess is due to this streaking effect, since the map itself ends up being largely degraded. My consensus maps do not have this streaking so I don’t think this is a result of excessive bad particles.

Has anyone had any success working around similar issues?

First issue is because the mask is too tight, or rather too hard. You can keep the same base map but make the soft edge wider and softer. The ripples come from the need for many high-frequency components (beyond Nyquist) to approximate the step-like edge of the mask, as shown in the image below.

Second issue is a typical feature of over-refinement. There isn’t enough signal in your local region for good alignments given the spuriously high FSC estimate (which is being used to set the refinement resolution limit). You can try manually limiting the maximum resolution used in refinement to e.g. 6 Å and see if this improves the map. Activating non-uniform refinement may help as well. Still, you should fix problem 1 first and see if these artifacts persist as strongly.

2 Likes

If the first issue is what I am seeing as well, I don’t think it is due to a too-sharp mask in this case (and in any case, the edge of the mask in local refinement should be set by the dynamic masking parameters, not the input mask).

I am routinely seeing these fine, sharp ripples outside the borders of the mask now, even in local refinements which previously ran successfully. The masked real space slices look fine, but the output map is extremely distorted by these artefacts. I didn’t see this prior to 2.12, so I wonder if it is a result of optimizations made to increase refinement speed (@apunjani is this possible)?

Cheers
Oli

@olibclarke From the picture it looks like it goes all the way through, no?

@Ablakely Is that the same type of artifact you’re seeing?

Yes it does, it is uniform - no evidence of any effect of the mask on this artefact

Oli

I haven’t seen that particular issue using 2.12.4.

This is what I was seeing as for the rippling and streaking. Although I previously had good results using this mask for this protein, I’m thinking the streaking in this case is due to relatively poorer contrast at the micrograph level for this dataset. If the rippling effect propagates inside my mask during refinement then that certainly isn’t helping. These examples are using a 6 voxel soft edge.

Ripples:
ripples
Streaking:
streaks

Ah yes that’s definitely a mask edge effect - happens with smaller masks. Limiting the number of iterations to e.g. 5 can help. Possibly limiting the max resolution used for alignment might help, too

I noticed that the soft edge becomes much less soft after iteration 0. I have tried setting the mask type to “static” and still get the same results. I wonder if this is what is causing my problem? Starting with a 6 voxel soft edge it looks like it is reduced to ~2 voxels after the first round of mask optimization. The map doesn’t appear to have any of the rippling effects until the auto-sharpened mask is applied.

Does this automatic mask optimization behavior seem correct? Is there some other setting I can change to prevent this?

Thanks

You can play with the “dynamic mask near” and “dynamic mask far” parameters - these are what set the width of the soft edge

Oli

The default parameters for dynamic mask near and far are 3 and 6 in the local refinement; whereas they are 6 and 14 in a normal homogenous refinement. So the behavior of a mask that’s sharper than expected that Ablakely noted seems the intended behavior, and olibclarke’s advice to adjust those parameters is probably on target. @Ablakely, did you try that, and did it resolve the issue?

@olibclarke Did you ever figure out those planar/linear artifacts? Suddenly a big problem for me…

So in my case I eventually figured out that they weren’t present in the unfiltered half maps, only in the sharpened maps - have you tried taking the half maps and postprocessing outside of cryoSPARC? Do you still see the same thing then?

Cheers
Oli

Aha…I feel a little dumb after running 8 jobs with different parameters and starting a new extraction. It’s in the sphere-masked & FSC filtered “raw” map, too. Sharpening probably intensifies it a lot. Below, yellow is half A, gray is _volume_map.mrc. Same threshold. Those noise planes to the upper right are only in the full map.

Don’t worry i ran a lot more than 8 jobs before I figured out what was going on! :joy: I still don’t understand why it happens though