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

transforming star file #123

Open
pherepanov opened this issue Sep 8, 2024 · 1 comment
Open

transforming star file #123

pherepanov opened this issue Sep 8, 2024 · 1 comment

Comments

@pherepanov
Copy link

pherepanov commented Sep 8, 2024

Dear Daniel,

I am trying to transform a star file (from a single particle project, Relion 5.0) to superpose subparticles based on Chimera transformation matrix. I used both star.py and subparticles.py, which produce different results but neither allow reconstruction of correctly oriented and positioned particle. Here are two commands I used:

star.py --transform "[[-0.990457,-0.00727857,0.137627,352.06],[-0.00724027,0.999973,0.000778896,-45.7555],[-0.137629,-0.000224997,-0.990484,426.689]]" cryosparc_P3_J13_010_particles_mindist35A.star cryosparc_P3_J13_010_particles_mindist35A_moved1.star

subparticles.py --transform "[[-0.990457,-0.00727857,0.137627,352.06],[-0.00724027,0.999973,0.000778896,-45.7555],[-0.137629,-0.000224997,-0.990484,426.689]]" cryosparc_P3_J13_010_particles_mindist35A.star cryosparc_P3_J13_010_particles_mindist35A_moved1c.star --boxsize 400 --apix 0.95

I noticed that in either case, positions of particles in star file (rlnCoordinateX,Y and rlnOriginX/YAngst) did not change, so shifts were not applied. Moreover, reconstructed orientations did not match one another. With the second method, it seems that a 180 degree rotation around Y, plus a translation is required to bring the new volume in the correct position.

I double-checked my transformation matrix in Chimera using matrixset, which placed the volume precisely where it needs to be. So the problem is with the script or with the way I am trying to use it (?). BTW, are these two scripts expected to produce different results with the same transformation matrix? My guess is that star.py expects a matrix from ZYZ Euler sequence and subpartilcles.py expected a matrix from ZXZ (Chimera) - is this interpretation correct?

Our pyem installation is recent, from June this year (after star.py update). I did try an older version also, with the same result.

Peter

@pherepanov
Copy link
Author

pherepanov commented Sep 9, 2024

I think I found a workaround using star.py:

  1. convert the Chimera-computed matrix from ZXZ (Chimera) to ZYZ (Relion) convention.
  2. rotate particles with star.py:

star.py --transform "[[0.9999734855418153, 0.007240271878779304, -0.0007788943920751361],[0.007278570633670146, -0.9904573829780646, 0.1376270137501123],[0.0002249952962242808, -0.13762903388226003, -0.9904838203674767]]" cryosparc_P3_J13_010_particles_mindist35A.star cryosparc_P3_J13_010_particles_mindist35A_lower_subparticle.star

  1. reconstruct rotated volume
  2. measure required shift in Chimera (disable any rotations during fitting)
  3. shift rotated particles with relion_star_handler via reciprocal shift of origins:

relion_star_handler --i cryosparc_P3_J13_010_particles_mindist35A_lower_subparticle.star --o cryosparc_P3_J13_010_particles_mindist35A_lower_subparticle_shifted_down.star --center --center_X 8.28719 --center_Y 53.3376 --center_Z -23.0831

Since this approach worked, I think there has to be a bug in subparticles.star, which does not get the right rotation around Y (either adds an extra 180 or does not do the main rotation).

Also, I noticed star.py adds extra columns to output star file (ucsfImageOriginalIndex, etc). Is there any use for them?

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

No branches or pull requests

1 participant