Basic question for mask making for local refinement

Dear All

I do have very basic question regarding mask making for local refinement described in the tutorial for yeast U4/U6.U5 tri-snRNP because I am simply confused and need some clarification.

Should a mask include “mask” that wraps the domain of interest to be locally refined and also the negative mask that wraps the region to be removed?

In other words, to locally refine a particular density, you need not only to make a make that covers the density of interest. At the same time, you need to make “negative” density mask that corresponds to a density that you like to remove during local refinement?

Thanks for your help.

Best

2 Likes

Hello @yurotakagi,

When doing a local refinement, the mask supplied to the local refinement should cover only the region of the volume that you are interested in refining.

The reason that the tutorial mentions you may also want to create a mask that covers the rest of the volume (i.e. a mask covering the entire protein, except for your selected region of interest), is because local refinement often has improved results when the input particle stack has undergone partial signal subtraction. This is basically an attempt to remove all the signal coming from the undesired portion of the volume, such that the signal remaining in the particle stack corresponds only to the region of interest. In cryoSPARC, the “Particle Subtraction (BETA)” job implements this, and it takes in this “inverse mask”, as well as the consensus refinement, and the input particles. A typical workflow would be:

  1. Use homogeneous or Non-Uniform refinement to obtain a consensus refinement, and a particle stack with near-correct alignments
  2. Feed the consensus refinement volume and particles into the “Particle Subtraction (BETA)” job, along with the “inverse mask”, to create a stack of particles – these particles will ideally only contain signal from the region of interest
  3. Use the “Local Refinement (BETA)” job with the other mask, covering your region of interest, and the signal subtracted particles

Let me know if you have any additional questions!

Best,
Michael

4 Likes

Dear Michael

Thank you very much for your explanation. Let me follow up to make sure that I understand correctly:

Let’s say we have a protein X composed of distinct domain A and B: X=A+B. After homogeneous or Non-Uniform refinement, we want to refine domain A. Apparently, we have two ways to do this:

Option 1:

  1. Make mask that covers domain A

  2. Go to “Local Refinement (BETA)” job and input particles, volume and the mask for domain A and run the job

Or

Option 2:

  1. Make “inverse mask” by subtracting Mask (A) - Mask (A+B=X) = Mask (-B)

  2. Go to “Particle Subtraction (BETA)” job and input input particles, volume and inverse mask, Mask (-B), and run the job

  3. Then go to “Local Refinement (BETA)” job and input “subtracted particles”, volume and Mask (A), and run the job.

Do I understand correctly? If so, the tutorial for yeast U4/U6.U5 tri-snRNP corresponds to Option 2.

Thanks for your help

Best

Yuro

3 Likes

Hello Yuro,

No problem, I am glad this was helpful!

Option 1 is entirely correct. In Option 2, the only correction I would make is that in order to generate the mask for particle subtraction, you actually want to take Mask (B) = Mask(A+B=X) - Mask(A). In other words, the Mask (B) covering the “undesired” domain should still be non-negative, and carry values in [0,1]. As referenced in the tutorial, if you are using UCSF Chimera, this can be done by using the vop subtract command on the binarized masks. The rest of Option 2 is exactly the intended workflow.

So for example, if maskA corresponds to the model number of the binary mask covering just domain A, and maskX corresponds to the model number of the binary mask covering the whole protein, you can generate a mask for Particle Subtraction using vop subtract #maskX #maskA. Note that all the subtraction should be done on the binary masks, but when you import these into cryoSPARC and begin processing, it is generally necessary to run a “Volume Tools” job and manually soften (and optionally dilate) these masks, since binary masks would introduce undesirable artefacts in the refined structure.

I hope this clarified the typical local refinement workflow!

Best,
Michael

Edit: fixed typo in Chimera command

4 Likes

Dear Michael

This is very helpful. But just one clarification: If domain B is “undesired” to be removed from protein X (=A+B), then mask for “Particle subtraction” should be made by executing: Vop subtract #maskX #maskA = Mask (X=A+B) - Mask (A) = Mask (B). Is this correct? Your command is: vop subtract #maskX #maskB, which leads to mask A.

Best
Yuro

1 Like

My apologies – you’re right, that’s a typo. I’ll fix it in the post. vop subtract #maskX #maskA would be the correct command.

Best,
Michael

1 Like

Hi
I have found this discussion very helpful, thanks.
I have one question regarding the fulcrum selection. In the tutorial, it suggests to divide the chimera generated values (x,y,z) by the pixel size. is it correct?
If yes, then should I use the super res. pixel which in my case is 0.324. Also, when I divided the coordination values (x,y,z) by 0.324, the new values are 561.1, 591.38, and 592.728. the local refinement ended up with the error “out of memory”
Any suggestion regarding how to fix the error will be highly appreciated.

Cheers

Hi @saif,

If you use the Chimera command getcrd sel when you have selected a coordinate using the Volume Tracer tool, then you should divide the returned coordinate values by the pixel size of the volume, rather than the raw movies. Note that if you have done any downsampling during extraction or otherwise, the pixel size will not be this value. To find the pixel size of the volume (if it is open in Chimera), click on “Features > Coordinates” in the Volume Viewer. This will show the pixel size under the “Voxel Size” entry.

Regarding the out of memory error – this may happen when the box size is especially large, but shouldn’t be related to the fulcrum chosen. If the memory error persists after re-running the job with no other concurrent processes using up GPU memory, could you create a new post and include the full traceback that was raised, and indicate as well the box size of the refinement?

Best,
Michael

1 Like

Hi @mmclean
I have revealed the pixel size as you suggested and now it’s working.
Thanks very much, :+1:

Saif

I have a few questions concerning this topic. I am trying the local refinement job. So far I have done the following:

  1. NU refinement
  2. created volume around region of interest in ChimeraX
  3. Imported volume in cryosparc and turned it into a mask A
  4. Took the same mask A to make an inverted mask B that contains everything but the region of interest.
  5. Ran particle subtract job with B. I find it confusing that the particles look the same as before to me. However a 2D classification job as suggested elsewhere on this forum seems to confirm that it worked. Why do the particles not look different after the subtraction?
  6. Ran local refinement.

In principle this seems to work, but I am not sure whether step 4) is correct or if mask B should only contain the part of the protein that I do not want to refine.

Thanks for your help!

Hi @gha,

I’m so sorry about the late reply. These steps are correct, and follow the typical workflow shown in the spliceosome case study. However, it would be better (as you allude to) for mask B to only cover the part of the protein that you don’t want to refine, rather than by defining mask B as the inverse of mask A (i.e. the difference between mask A and 1). This is because almost everywhere that masks are used, they are assumed to decay to zero as the edges of the box are approached.

It is a bit more laborious to make mask B this way, but you can follow the tips on the Mask Selection and Generation in UCSF Chimera guide page. It will require using Chimera’s Volume Eraser tool.

Regarding the subtracted particles looking the same as before – sometimes it is difficult to see the difference in subtracted vs. unsubtracted particles, especially if the protein is small or the dataset especially noisy. Are you comparing the streamlog plots shown in the subtraction job? Also, did you run the subtraction job with default parameters?

Let me know if you have any other questions!

Best regards,
Michael

Hi Michael,
When we prepare a mask for local refinement using Volume Tool, do we need to define the “resample to box size”? I input a mask that was generated from pdb and resampled to my 3D Ab-inito model. If the “resample to box size” is ignored, the output mask is only resampled to a half size. Is this correct? Thanks, L.

Hi @Lan,

All of the refinement jobs will re-sample the input mask to the same box size as the volume before using the mask. Thus, it is not necessary to use the Volume Tools job to re-sample the mask before using it.

Best,
Michael

1 Like

Hi Michael,
Can you explain the difference between the option 1 and option 2?
How do you actually do particle subtraction? is it raw image - the projection of a masked 3D-map?
How do you apply the mask for local refinement?

Thank you,
Xiangan

Hi @xliu,

Particle subtraction involves a set of particles that have been aligned to a reference, together with a mask covering the region you would like to subtract from the data, and then projecting & subtracting that region from the particles, and re-writing them out.

The difference between options 1 and 2 is that option 1 does not involve particle subtraction, but option 2 does. Which option is better depends on both the dataset characteristics, including the accuracy of the alignments, the size of the mask, etc. so it can’t generally be stated which is preferred.

To answer the last question: particle subtraction requires a mask covering the region of the structure you want removed from the data. Local refinement requires the opposite: a mask covering the region of the structure you want to refine. You can find more info about both jobs in our local refinement documentation

Best,
Michael

1 Like