Averaged power spectrum

I have a suggestion for a new feature in cryoSPARC that is extremely important for symmetry determination of helical samples: an averaged power spectrum. People mistakenly assume that the power spectrum of an average is the same as an averaged power spectrum, and this is not true. The averaged power spectrum is an incoherent average that is invariant under the shifts of images that are needed to generate a coherent real-space average. For example, if one averages together images to look like Albert Einstein, then the power spectrum of this average will look like the power spectrum of Einstein. However, the averaged power spectrum will show no such artifact, and will actually represent the information in the raw images. For helical specimens one may easily see additional information that does not appear in the class average due to heterogeneity. What one needs to do is select the segments associated with the 2D classes desired, impose the rotations on those segments needed to align them to the class average, generate their power spectra, and add these together. Will this be possible?
Regards,
Ed

5 Likes

Dear @egelman,

Thank you for the feature request, and apologies for my delayed response. We will definitely look into generating power spectra using the described procedure, as this would be a great addition to aid helical symmetry determination. It would be fairly straightforward to add this as a standalone post-processing job after 2D classification. I believe another user (@adesfosses) has proposed a similar feature (Proposing a job type to add for helical processing).

In averaging power spectra this way, do you typically try to account for the CTF of the particles? It makes sense that it’s not crucial to account for the CTF when averaging the power spectra compared to the raw images, since only the amplitude of the raw images is used. However, I wonder if this matters when using the power spectra downstream for indexing purposes.

Best,
Michael

Thanks for the response. Indeed, what I have proposed appears to be the same as Desfosses, and he has raised some of the motivation for why this is important. While one needs to do CTF correction to create a 2D class average, the power spectrum does not change if you flip phases or do not flip phases - it is purely the amplitude squared. Of course, one can also introduce amplitude changes when correcting the CTF (such as when one uses CTF-multiplication to improve the SNR) but this will not greatly change the layer lines seen in the averaged power spectrum. Indexing will not depend upon any phase information, since this is completely lost in an averaged power spectrum. If one had a power spectrum from a single filament, then phase information could be extracted. In fact, this was how old Fourier-Bessel processing was done, extracting amplitudes and phases from the FT of each filament. But with extremely weak contrast from thin filaments in ice, this is generally impossible. I hope that this helps.
Regards,
Ed

1 Like

I have heard nothing more, but wonder if there is simply a mechanism to create a stack file in cryoSPARC of the image segments that have been used in a 3D reconstruction, with the rotations and shifts imposed on them? If such a stack file could be generated, then it would be trivial for us to write a program to generate the averaged power spectrum from such segments. At the moment, the segments have random orientations, and for the average power spectrum we need them to all be aligned to a common orientation of the helical axis. Surely this could not be difficult to implement?
Regards,
Ed

Dear Prof. @egelman,

Currently there isn’t a built-in mechanism to shift/rotate and re-write out a particle stack in cryoSPARC. Unfortunately the closest thing to that is 2D classification, but this doesn’t address the issue. We are looking to add this feature as soon as possible, but averaging images’ power spectra would require somewhat nontrivial additions to our engine, so it would likely have to wait until the next release.

In the meantime it may be possible to accomplish this via scripting, but would likely be laborious. The alignments2Dare present in any .cs file of 2D-classified particles, which contains the axis-angle rotations specifying the in-plane angle of the particles in units of radians. It may be possible to write out a stack of aligned particles using a .cs file of particles from 2D classification in conjunction with an external software or python package capable of image rotation, such as pyem. However, I can’t advise more as I do not have much experience using pyem.

Best,
Michael

1 Like

Thanks. We do not need the averaging of power spectra (we can do that quite easily ourselves), only the aligned stack itself. The .cs file appears to be binary, so that will not be useful.

Regards,

Ed

@egelman The .cs files are just serialized numpy arrays; you can read it with numpy.load().

Actually, I think you should be able to export them with csparc2star.py and then use relion_image_handler to apply the alignments. (--avg_ampl2_ali?).

1 Like

Piggybacking off of @DanielAsarnow’s comment: you can find a tutorial written on our guide about manipulating .cs files in python (the example is using scripting to re-center particles).

Best,
Michael

1 Like