--apix in e2proc3d.py does not always change the pixel size

268 views
Skip to first unread message

digvij...@gmail.com

unread,
Apr 21, 2021, 2:48:54 AM4/21/21
to EMAN2
Hi EMAN2 team,

Sometimes the --apix does not change the pixel size, usually for files whose pixel size =1.00).

E.g., 
e2proc3d.py test.hdf test2.hdf --apix=4.3
produces tes2.hdf with the pixel size of 1 (same as test.hdf) as opposed to 4.3. 


Thanks,
Digvijay


Muyuan Chen

unread,
Apr 21, 2021, 1:32:46 PM4/21/21
to em...@googlegroups.com
I assume this does not happen to every file since I cannot trigger this on a random file myself. Do you have a specific file that this happens that is reproducible?

--
--
----------------------------------------------------------------------------------------------
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/c6035211-925e-4bda-97e5-89b891be3216n%40googlegroups.com.

digvij...@gmail.com

unread,
Apr 21, 2021, 2:22:44 PM4/21/21
to EMAN2
Yes, I can send file(s) on which I experienced the problem. 

digvij...@gmail.com

unread,
Apr 21, 2021, 2:48:54 PM4/21/21
to EMAN2
I am sending a tiny version (so it can be sent as an attachment) of the file in which I experienced the problem. I have experienced it on other files as well. 

e2proc3d.py :32:32:32:0 SmallDisk.hdf --apix=6.74 --process=testimage.disc:height=7:major=4:minor=4
^The above was used to create the file SmallDisc with apix of 6.74. Reading its header (header SmallDisk.hdf) gives the right info about the size etc, but the apix is 1.0 I then further converted SmallDisk into SmallDisk_A.hdf with apix of 6.74 

e2proc3d.py SmallDisk SmallDisk_A.hdf  --apix=6.74 .Same issue as above. The header gives the pixel size of 1. 

But when I use e2iminfo.py -H SmallDisk.hdf, I get the right pixel value. So in the EMAN2 system, the file should behave well. But the problem is that reading/processing this file in other systems (like Chimera) which are sometimes convenient and required, uses its pixel value of 1 for displaying the structure which distorts/scales it compared to other relevant structures. Therefore, I have to convert hdf to mrc (using e2proc3d.py) and then use IMOD's alterheader to change the pixel size in mrc (alterheader does not work in hdf) and then change back the mrc to hdf. After which, the header YY.hdf reads the right pixel value and opens accordingly in Chimera. For some other .hdf files, --apix works and even their header YY.hdf reads the pixel value specified in --apix.

Thanks & cheers,


SmallDisk_A.hdf
SmallDisk.hdf

Muyuan Chen

unread,
Apr 21, 2021, 2:59:37 PM4/21/21
to em...@googlegroups.com
I think chimera can read eman2 hdf files with the correct apix in the header, so you shouldn't need to convert it back and forth. IMOD, at least the version I am on, cannot. But if you just output mrc from eman, it should be recognizeble by IMOD, without the alterheader step.

$ e2proc3d.py :32:32:32:0 SmallDisk.mrc --apix=6.74 --process=testimage.disc:height=7:major=4:minor=4

$ header SmallDisk.mrc  

RO image file on unit   1 : SmallDisk.mrc     Size=        129 K

Number of columns, rows, sections .....      32      32      32
Map mode ..............................    2   (32-bit real)               
Start cols, rows, sects, grid x,y,z ...  -16   -16   -16      32     32     32
Pixel spacing (Angstroms)..............   6.740      6.740      6.740     
Cell angles ...........................   90.000   90.000   90.000




digvij...@gmail.com

unread,
Apr 21, 2021, 5:28:08 PM4/21/21
to EMAN2
Thank you!

Indeed, when I double-checked that Chimera is reading the pixel size of .hdf as well correctly and not reading the wrong one obtained from IMOD's header. I mistakingly assumed that the Chimera is misreading the pixel size because the .hdf and .mrc files displayed at very different regions in the Chimera. It turns out that could be because the stars cols, rows, sects value changes from 0 to -16 (32/2) when converting the .hdf into .mrc But the change in start cols, rows does not always occur when changing from hdf to mrc. 

Ludtke, Steven J.

unread,
Apr 23, 2021, 10:13:52 AM4/23/21
to em...@googlegroups.com
We did a fair bit of work at one point to insure that EMAN2 and Chimera both dealt with positioning in the same way, so you could read docking results. Unfortunately there isn't a single convention for handling the issue of volume/PDB alignments between software packages, so it very much depends on the software you use.

--------------------------------------------------------------------------------------
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine 
Charles C. Bell Jr., Professor of Structural Biology
Dept. of Biochemistry and Molecular Biology                      (www.bcm.edu/biochem)
Academic Director, CryoEM Core                                        (cryoem.bcm.edu)
Co-Director CIBR Center                                    (www.bcm.edu/research/cibr)




Reply all
Reply to author
Forward
0 new messages