Questions about tomogram handedness

707 views
Skip to first unread message

Doulin Shepherd

unread,
Aug 30, 2023, 8:14:58 AM8/30/23
to EMAN2

Hello Eman2 Team,

I had previously encountered issues concerning the handedness of my sub-tomogram averages. While I now have a better understanding of the potential issue, I'm still uncertain about where and how I'm processing the tomograms incorrectly.

In the Tomography 5 mdoc files, the tilt axis is stated as 4.2. But when I examine the header information of the tilt series using IMOD, the tilt axis is shown as -94.2. Additionally, there's a note indicating that the MRC file is inverted in Y.

When performing IMOD reconstructions/alignments, I use the -94.2 value. In Eman2, whether I input -94.2 or let the system estimate the tilt axis from scratch, the final value hovers around -86 (similar values appear with Aretomo). Yet, when I compare tomograms reconstructed with IMOD to those with Eman2/Aretomo, the tomograms appear as mirror images along the x-axis.

I'm speculating that something needs to be flipped, either the mrc file, the tilt axis, or both, but I'm unsure which. If I keep the mrc files as they are and allow Eman2 to estimate the tilt axis, reconstruct the tomograms and check the handedness for 5-6 tilt series they are all stated to have correct handedness (current hand better >90%). But since all my averages are mirrored, I believe there's an error in my tomogram reconstruction.

I'm seeking clarification on this matter, as I've been unable to obtain a definitive answer for this scenario. 

Steve Ludtke

unread,
Aug 30, 2023, 8:28:35 AM8/30/23
to em...@googlegroups.com
The defocus-based tilt axis determination in EMAN2 is very reliable if you get a high percentage as you are stating. 

HOWEVER, there is one major issue with specific detectors. The assumption EMAN2 makes (and really has to make) is that the images it’s getting are in the actual orientation they existed on the detector. Unfortunately, some unnamed detector manufacturer may not have read the MRC file specifications properly and didn’t realize that the MRC format defines the image origin to be in the lower left corner, not the upper left corner as it is in most other image formats. When this company writes MRC images, when other software reads these images they are flipped along the y axis. You can test whether your detector suffers from this problem by writing the same image in both MRC and TIFF format, then visualizing both in another program (like with e2display.py). If the TIFF and MRC appear the same in e2display.py, then this problem doesn’t exist. 

If this flipping happens it cannot be corrected automatically. The CTF detection scheme will provide a valid tilt axis, and everything will reconstruct properly with correct CTF correction, but the handedness of the tomogram will be incorrect. 

While this may seem like a terrible thing which nobody possibly could have missed, there are 2 major points:
1) this only impacts tomography. If single particle data is flipped in this way, it has zero impact on the analysis since the handedness is arbitrary anyway (well, maybe if you try to do certain exotic corrections)
2) If you read the MRC image back into the microscope software it will appear correct, because they make the same (incorrect) assumption when both reading and writing.


--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/980e2ebb-f995-4321-b42e-d50bb29a9c97n%40googlegroups.com.

Grigory Sharov

unread,
Aug 30, 2023, 8:36:03 AM8/30/23
to em...@googlegroups.com
Hi,

I don't know about eman2 vs imod, but to go from TFS Tomo5 mdoc to imod/etomo convention, do TiltAxisAngle * (-1) - 90. E.g. 4.2*(-1)-90=-94.2. This should approx. match SerialEM mdoc TiltAxisAngle. 

Best regards,
Grigory

--------------------------------------------------------------------------------
Grigory Sharov, Ph.D.

MRC Laboratory of Molecular Biology,
Francis Crick Avenue,
Cambridge Biomedical Campus,
Cambridge CB2 0QH, UK.
tel. +44 (0) 1223 267228


--

Steve Ludtke

unread,
Aug 30, 2023, 8:51:49 AM8/30/23
to em...@googlegroups.com
I should add that you can easily bulk correct the raw tilt series in-place:

e2proc2d.py <tiltseries> <tiltseries> --process xform.reverse:axis=y

Doulin Shepherd

unread,
Sep 2, 2023, 4:23:05 AM9/2/23
to EMAN2

Thanks for the replies

I think the issue would the writing of the MRC image. I will have a check next week to be sure.

I am assuming that Imod checks to see if the image is inverted and does the correction. I just checked and the same MRC opened in Imod and Eman2 are flipped.

Cheers,
Doulin

Ludtke, Steven J.

unread,
Sep 2, 2023, 11:10:12 AM9/2/23
to em...@googlegroups.com
Hmm, that's an interesting observation. I'll ask David about it. While it is somewhat possible to detect this particular type of MRC file, flipping it automatically on reading can lead to a bunch of undesirable side-effects downstream, and the risk of flipping it more than once in certain situations. It would also mean that historical projects using images of this type would suddenly have incorrect geometry (if we changed it now).

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center


David Boyer

unread,
Sep 25, 2023, 7:33:48 PM9/25/23
to EMAN2
Hello,

I was looking at this thread today and noticed something similar with my own data set. If I open an .mrc file from my recent data set in imod versus e2display.py - the images are flipped. This seems to support the idea that Imod does do some sort of auto-detection? Also, If I use the header command on that a tilt image, it gives the warning "This MRC file is apparently inverted in Y". Also, if I use alignframes to do motion-correction on the dose-fractionated tilts, alignframes automatically inverts all the images so that if I open the motion-corrected tilts in e2display.py - they show the orientation that imod gave me before motion correction, not the orientation e2display showed me before motion correction.

Steve, I wonder if you happened to ask David about whether Imod does some sort of automatic detection and inversion of these type of flipped images?
Screenshot_2023-09-25_16-25-45.png

Ludtke, Steven J.

unread,
Sep 25, 2023, 7:41:33 PM9/25/23
to em...@googlegroups.com
Yes, I did ask David about it, and apparently he did add an option that tries to detect whether an MRC file was created by FEI/Thermo software, and if so, it automatically flips the image. While this is the correct thing to do, it also means that if you did something, like rewrite the MRC file without preserving the special FEI header, the image would suddenly flip.  It is borderline unforgivable that FEI made this error in the early days and never did anything about it. While it won't impact single particle, clearly it has a major effect in tomography.

My current thought is to have EMAN print out a warning message when it detects one of these flipped images (once per-program only) to make the user aware of the issue, but not automatically "correct" the image, as that could lead to all sorts of inconsistent behaviors. I haven't implemented this yet. 

-----------------------------------------
Steven Ludtke, slud...@gmail.com 


To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/333b7c3f-f2c5-4649-8dd6-47da3a310e56n%40googlegroups.com.
<Screenshot_2023-09-25_16-25-45.png>

David Boyer

unread,
Sep 25, 2023, 8:34:58 PM9/25/23
to EMAN2
Good to know!

So if I understand the risk correctly - the point is that if you rewrite the MRC file as is, but don't save the fact that it was written via FEI/Thermo, then the incorrect flipping will become permanent - but you will have no way to know?

Ludtke, Steven J.

unread,
Sep 25, 2023, 8:46:44 PM9/25/23
to em...@googlegroups.com
Several different possibilities, if you do flip the image and write it back to MRC again, preserving the header, does that mean you should "unflip" it when writing? What if you write a "derived" image to MRC format, so the header shouldn't be preserved?  Really there is no single "correct" way to solve this problem, just a lot of partial solutions the user has to be aware of. 

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

David Boyer

unread,
Sep 25, 2023, 9:07:28 PM9/25/23
to em...@googlegroups.com
As if tomography weren't hard enough!

You received this message because you are subscribed to a topic in the Google Groups "EMAN2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/eman2/piux0GdX_7M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/1C41039F-BD73-40E9-B290-4001C44F77E1%40bcm.edu.

David Boyer

unread,
Sep 26, 2023, 8:44:29 PM9/26/23
to EMAN2
I have another question related to this that I've been meaning to ask. What is the relationship between the EMAN2 convention for tilt axis and the Aretomo convention? We use both frequently in our lab and for cases where we use Aretomo, I'd like to be able to take advantage of EMAN2's --check_hand to find the correct handedness.

For instance, right now, I have two different datasets collected on two different microscopes. For dataset 1, EMAN2 confidently says that --tltax should be -85 and AreTomo says the tilt axis is 95. For dataset 2, EMAN2 confidently says that the --tltax should be -95 and AreTomo says the tilt axis is 85. It seems that EMAN2 and AreTomo's tilt axes are consistently 180 apart, but only EMAN2 offers the CTF-based method for giving the right handedness. I'm assuming the AreTomo tilt axis has a 50/50 chance of being the correct handedness at the moment. But can I use the EMAN2 result to get the correct handedness when using AreTomo?

Does that make sense?

Thanks

Ludtke, Steven J.

unread,
Sep 26, 2023, 10:53:37 PM9/26/23
to em...@googlegroups.com

---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center

favicon.ico
Reply all
Reply to author
Forward
0 new messages