We solved a filament structure following cryosparc helical processing tutorial, it’s very helpful! We are trying to figure out the direction of the filament growth on raw micrograph, i.e., the orientation of a filament on raw micrograph. Is there a way for this purpose?
Thanks in advance!
I added it a couple months ago, because I got frustrated figuring out the particle coordinate conversions in one dataset. It uses a .star file and shows the particle picks on a micrograph (either a specific one you choose, or one with ~the median number of particles).
Thanks! So I need to convert the refined filament segments to star file. And use your script to label the pick by AnglePsi? This function is already in your script or still need to be modified?
If you’re referring to the in-plane rotation angle of the filament, CryoSPARC stores this internally in the filament/filament_pose field, assuming that particle picking was done in CryoSPARC via the Filament Tracer. This is estimated during picking.
If picking was done elsewhere, you can instead use the 3D alignments to determine the in-plane rotation angle, as @DanielAsarnow pointed out (by converting CryoSPARC’s alignments3D/pose from axis-angle format to Euler angles in RELION’s format – then as Daniel mentioned rlnAnglePsi holds the third Euler angle which should be in-plane rotation)
After convert the segments to star file, my colleague fellow helps me plot the lnAnglePsi with Daniel’s script, see the following figure (red arrow), is the orientation supposed to be pointed to different directions?
Great, glad you got that to work! There is also a .ipynb (or you could copy my code into a new one) on my pyem-nb github, if you want to do it more interactively.
Right now my cs conversion code is copying the filament_pose, and then overwriting that with the AnglePsi if there are also angles from 3D refinement.
So for your refined particles this is showing you the refined angles for each particle. If you use just the picked particles before refinement you should be able to see the angle from picking the filaments instead. If you load up the .cs file directly in your new script (np.load('file.cs')) you could get it out from the final .cs file as well as noted by @mmclean. The conversion of the angle is demonstrated in pyem/pyem/metadata.py:cryosparc_2_cs_filament_parameters().
As to what you see - I think a perfect refinement of a perfectly flat and straight filament would show the angles to all be aligned. In practice you probably have some residual tilt, some bending, slightly variable twists, as well as noisy particles that aren’t perfectly refined. I am not sure what the expected errors should be but if you have access to some super-high res filament data that would be an interesting point of comparison.
That’s a interesting point. Currently the filament can be refined to 3.1-3.5A by helical refine with symmetry. Though I did see some junk particles when I do 2d with large number of classes. Maybe using your idea could further purify the particles more efficiently.