Data sign inversion on local motion correction?

Hi

It’s not that important, but I have a question about Local Motion Correction and pyem

I’m using cryoSPARC v3.3.1+220215 and pyem v0.4

I’ve noticed some differences between the general Motion correction (patch motion, motioncorr2, etc) and Local Motion Correction on cryoSPARC when pyem converts .cs to .star

If I convert the 2D or 3D job from LocalMotion extract particles .cs to .star, relion_reconstruct command gave me a very weird 3D volume. It looks like a inverted density on the positive threshold so I subtract them from box density.

then, I re-import the .star from pyem on cryoSPARC and 2D class. It seems that the sign is definitely inverted.

(for example)

This could be solved by changing the data sign on Particle Improt tab

Inversion of data sign come from Local Motion Correction or pyem conversion ? I can’t find something about the particle sign in .star file…

What should I do if I want to use the Local Motion Corrected particles from cryoSPARC directly to the RELION classification ?

Thank you!

Thank you for the detailed exposition. cryoSPARC Local motion correction outputs particles with a different data sign when compared to other motion correction job types. cryoSPARC tracks the sign information internally in the blob/sign field of “*.cs” files. Inspection and manipulation of “*.cs” files is described in a tutorial. There may be a way to inform Relion about that sign change.

3 Likes

Thank you! @wtempel
I will edit the .cs file with python described in the tutorial.

Hello @wtempel

I’m sorry for the delay in the feedback due to the busy experimental schedules from the last reply.
Now, I try to edit .cs with python described in a tutorial.

In general motion_correct jobs,
the blob/sign value of particles.cs is array([-1., -1., -1., …, -1., -1., -1.], dtype=float32)

and then, the localmotioncorrected particle.cs has array([1., 1., 1., …, 1., 1., 1.], dtype=float32)

yes, It has a different sign you mentioned above

so, I edit like this
new_sign_array = particle_dataset.data[‘blob/sign’] * -1
particle_dataset.data[‘blob/sign’] = new_sign_array
particle_dataset.to_file(dataset_path)

I checked the blob/sign was converted to +1 sign after this command.
then, I make a .star file with pyem for relion

But, I re-import the sign_inverted.star to cryoSPARC for sign validation, It still looks flipped sign in 2D :frowning:

Need another conversion in particles.cs generated by localmotioncorrected particles ??
thank you!

To avoid confusion during further discussion, please can you

  1. post the header plus lines for perhaps one or two particles from sign_inverted.star
  2. describe the last and next-to-last steps that produced sign_inverted.star
  3. post a screen shot of the cryoSPARC re-import job’s Inputs and Parameters tab

Thanks.