Convert euler angles and shift from Relion to EMAN2

802 views
Skip to first unread message

Rui Yan

unread,
Aug 28, 2014, 3:40:13 PM8/28/14
to em...@googlegroups.com
Hi,
I have a star file generated from Relion. I am wondering how to convert 3 euler angles and 2 shift from Relion to EMAN2 convention. 
The conversion of euler angles looks fine if I use Transform class to read in by using 'type': 'spider' and then get_params("eman"). But the XY shift in star file makes me confused to convert them to EMAN2 convention. 
Is it correct to simply treat them as "tx" "ty" in "spider" type and then convert them to "eman" type? 

Thanks a lot for your help.
Rui

Steven Ludtke

unread,
Aug 28, 2014, 4:41:41 PM8/28/14
to em...@googlegroups.com
Hi Rui,
The easiest way would be to just use e2reliontoeman.py
Otherwise, I'd suggest reading that program (it's pretty simple), and you can see how the conversion is accomplished. 

----------------------------------------------------------------------------
Steven Ludtke, Ph.D.
Professor, Dept of Biochemistry and Mol. Biol.         (www.bcm.edu/biochem)
Co-Director National Center For Macromolecular Imaging        (ncmi.bcm.edu)
Co-Director CIBR Center                          (www.bcm.edu/research/cibr)
Baylor College of Medicine                             





--
--
----------------------------------------------------------------------------------------------
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.
For more options, visit https://groups.google.com/d/optout.

Eaazhisai Kandiah

unread,
Jun 3, 2015, 8:17:10 AM6/3/15
to em...@googlegroups.com
Hi Steve,

I tried e2reliontoeman.py on a star file which has CTF and projection parameters. But when I looked to the header of the resulting .hdf file, i found there was no CTF fields and the xform.projection values are filled by default ones and the apix=1.0 instead of 1.186. I used the command as follows:

e2reliontoeman.py --apix=1.186 data-eman2.star

I've attached a pdf file with snapshots of my input relion star file and the header of one of the .hdf file. 

Please help me to figure out where i make the mistake.

Thanks a lot in advance
Isai
reliontoeman.pdf

Steven Ludtke

unread,
Jun 3, 2015, 9:05:57 AM6/3/15
to em...@googlegroups.com
Right... my mistake.  The CTF parameters probably were converted, but they do not always live in the header of the HDF file. Rather, the main source prior to running the CTF->generate output step is in the per-micrograph info/*.json files. If you look in info/ you should find them there. They do get stored in the header of the phase-flipped particles.

However, as to the other point, e2emantorelion doesn't actually do anything with orientation parameters. This is actually a key point:

-> Neither EMAN nor Relion associate one specific orientation with individual particles!  Yes, I realize that you have a .star file which would seem to bely that point, and it is possible to generate a similar set of values from an EMAN2 refinement. However, these are not a complete representation of reality: 

- Relion uses regularized maximum likelihood. That means, every particle is considered to be in multiple orientations, weighted using the probability that each potential orientation is correct. In an ideal case, at the end of a final refinement, you would think that this would give you a single angle per particle, but even then, this is not necessarily true. Consider, for example, a particle with C4 symmetry. In principle this means each particle SHOULD be in 4 different orientations, not just 1. In practice, I think (you'll have to ask Sjors to be sure) he got tired of people asking for Euler angles, and just picked the highest probability for each particle so people could make orientation plots, etc. However, if you took those per-particle angles and used them to reconstruct your data, you would not normally get exactly the same 3D map that Relion produced internally.

- EMAN2 uses process of real-space reference-based classification, but also includes the concept that each particle may be in more than one orientation (this is optional, and not done in the same way Relion does it).  In the end, 3-D orientation is assigned to 2-D class-averages, not to individual particles, and it is the class-averages which are reconstructed in 3-D. While we also have tools to extrapolate 3-D orientations for each particle from these results and output them, again, you likely would not get exactly the same 3-D reconstruction if you just took the particles and these angles and reconstructed in 3-D.

Anyway, the point is that we don't convert the angles from Relion even if they are present because EMAN wouldn't do anything with them internally even if they were converted. EMAN starts from scratch in each refinement cycle, and redetermines the Euler angles, despite this, it is still generally 5-10x faster than Relion, and can achieve near-identical results.

-------
So, back to your original question. Yes, it is actually possible to get Relion orientation parameters into EMAN2 convention using the Transform object as you originally asserted. However, before I can advise you on this, I need to know what it is you want to do with them in EMAN2 once you have them, as this will impact how you do the conversion.

Even though the Transform object handles the fundamental Euler angle convention change, there are still several issues you have to consider:
a) is it the particles that are being rotated, or the coordinate system
b) are 2-D translations taking place before or after rotation
c) where is the center of the box defined to be

Unfortunately, at present, these questions have to be answered on a per-software package basis.  This painful fact is one of the many reasons CryoEM software developers are trying to get together and produce the EMX exchange format...

We have been working a lot on EMX recently, and this is likely why I forgot we skipped this process in the relion conversion script...


<reliontoeman.pdf>

----------------------------------------------------------------------------
Steven Ludtke, Ph.D.
Professor, Dept. of Biochemistry and Mol. Biol.                Those who do
Co-Director National Center For Macromolecular Imaging            ARE
Baylor College of Medicine                                     The converse
slu...@bcm.edu  -or-  ste...@alumni.caltech.edu               also applies
http://ncmi.bcm.edu/~stevel

Paul Penczek

unread,
Jun 3, 2015, 9:36:22 AM6/3/15
to em...@googlegroups.com
I have a set of programs doing full conversion from/to sparx/eman2/relion.  Please write to me directly if interested. 

Regards,
Pawel

Eaazhisai Kandiah

unread,
Jun 4, 2015, 4:39:02 AM6/4/15
to em...@googlegroups.com
Thanks a lot, Steve for a clear explanation on the softwares and hence the difficulty in the conversion. I am trying to calculate the variability in my 3D reconstruction and for this, I would like to use sx3dvaribility from SPARX and that's why I want to create the EMAN database from RELION star file. And because my problem is much related to SPARX, Pawel has been kindly helping me for the sx3dvaribility and now for the conversion as well.

Thanks again for such a nice explanation!

Isai

******************************************************************
Eaazhisai Kandiah (a.k.a)Isai
Post-doctoral fellow
Unit of Virus Host Cell Interactions
UMI 3265 (CNRS-UJF-EMBL)
EPN CAMPUS
71 Avenue des martyrs
CS 90181
38042 Grenoble cedex 9
France

tel:+33-(0)476207635; fax:+33-(0)476209400
Email: ikan...@embl.fr

******************************************************************
Reply all
Reply to author
Forward
0 new messages