Possible bug regarding gain reference manipulation and MotionCor2 wrapper

Since, like other users, I also get cufftAllocFailed errors when trying to do Patch motion correction, I have resorted to using the MotionCor2 wrapper to doing patch motion correction. However, I think I have discovered a minor bug. If you need to manipulate your gain reference, say flip it along the y-axis, you would specify this in the Import Movies job. The MotionCor2 wrapper seems to read this and add the -FlipGain 1 option to the job command. However, is seems like the Import Movies job already flips the gain reference. Therefore, the effect of the -FlipGain 1 option in MotionCor2 is to flip the gain reference back. It seems like the current workaround is to import your movies without specifying that the gain reference should be flipped, and then manually add the -FlipGain 1 option.

1 Like

Hi @MattW,

Thanks for reporting. Does this happen when your imported movies are .tif files?

Yes, this occurs with movies in .tif format. Also, I have noticed that if you bin the movies in MotionCor2, cryosparc does not seem to understand that the pixel size has changed. I observed this when I tried to 2D-classify particles from micrographs that were binned in MotionCor2; however, when the 2D-classification job read in the particles it reported the un-binned pixel size.

Great! Please update this post if you find any more bugs. We’ll work to fix all these bugs and deploy them in (hopefully) the next release of cryoSPARC.

Several of us have seen this bug too. When we import tiff files with some gain rotation and flip, it looks fine in the import preview however previews of the further steps (like autopicking) show the gain is not properly corrected if we use MotionCor2 wrapper. there is no problem for the further steps if we use cryosparc motion correction. If we would like to use motioncor2 wrapper, our workaround is to import tiff files without gain flip/rotation which yields not properly corrected previews of the tiff files. However, further steps of MotionCor2 looks fine. I guess MotionCor2 deals with the gain differently.

1 Like

Hi @alburse,

The effect you describe is due to the fact that in cryoSPARC, the “standard” tiff file format x/y axes convention is used where the fast axis of an array is positive x, and the slow axis is positive y. In most other cryoEM programs (motioncor2 for instance), the slow axis is considered to be negative y…
We are not sure whether we will change the cryoSPARC convention at some point but that would be the only way to avoid the discrepancy.

Hi @MattW,

This bug has been fixed in cryoSPARC v2.15.0