Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before converting to STAR, put refined shifts in terms of blob apix #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PlethoraChutney
Copy link

This PR ensures that refined shifts are correct in STAR files created with csparc2star.py

This discussion in our forum led to us noticing that csparc2star.py uses the image pixel size to convert shifts from pixels to angstroms. However, the shifts in alignment{2D,3D}/shift are in terms of the pixels in alignment{2D/3D}/psize_A, which may differ from the image pixel size if the job which refined these shifts performed on-the-fly downsampling. This results in shifts which are wrong by a factor of the ratio between the two pixel sizes.

image
image
image

(the last 0.02 Å is from all the per-particle scales being reset to 1.0)

Since we don't care about the refinement pixel size in the final star file, I took what seemed the simplest route and just converted them immediately after loading the first .cs file. I tested this with an exported .cs file and the passthrough .cs file from the job itself. Since it looks like cryosparc_2_cs_model_parameters() is never called on passthroughs I think this should always work...

The change to star.py fixes a separate issue in which .star files produced by csparc2star.py never had particle shifts because sync_origins_from_angst() didn't save the _rlnOrigin{X/Y}Angst columns and the _rlnOrigin{X/Y} columns were dropped as deprecated. The missing shifts then prevented CryoSPARC from importing the poses at all. Please do let me know if this isn't a bug and I missed a setting somewhere!

Thanks, and please let me know if you have any more questions or if you need me to rework it some other way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant