Begin forwarded message:

From: Tom Goddard <goddard@sonic.net>
Subject: Re: [chimerax-users] EMDB-SFF segmentation file: application of transform 0 for image-to-physical projection
Date: January 30, 2023 at 11:54:02 AM PST
To: Paul Korir
Cc:  Martin Schorb

Hi Paul,

  ChimeraX does not specify what distance units the open models use.  For atomic structures and cryoEM map it is usually Angstroms.  For light microscopy images it is often microns.  For medical image scans (MRI, CAT) it is I think meters.  The file formats for the data define the physical distance units, not ChimeraX.  So if EMDB SFF provides a segmentation for say an MRC or CCP4 density map file the scaling of that density map in the ChimeraX graphics is taken from the file header which has a field "cell dimensions in Angstroms".  If a segmentation of that density map is made that is say a bounding surface it might use x,y,z coordinates in Angstroms or it might use grid index units when it writes out a file, that would depend on the segmentation file format and the software that is writing the segmentation.  In ChimeraX it always tries to scale the data into physical units so that different data sets, like an atomic structure and 3D image data have the correct relative scale.  So ChimeraX never displays images using grid index units.

  So from what you say about EMDB SFF the first transform goes from grid index units to physical units and ChimeraX should apply that transformation to the segmentation data so that it has the same scaling as the map data that the segmentation was derived from.  I see there is a function in the ChimeraX EMDB SFF file reader called "guess_scale_and_shift" that is trying to figure out what transform to apply, but it is just a hack and looks for any non-identity transform.

https://github.com/RBVI/ChimeraX/blob/da72f2cd9b23c0c35a66122b7edc453d593ea3e3/src/bundles/emdb_sff/src/sff.py#L125

And another comment in the code suggests it is doing that hack because it was needed for EMDB SFF test data EMDB 1547.

  If I understand you correctly ChimeraX should instead always apply the first transform from transforms_list.  I can make that change.  The main thing will be to test it on pairs of EMDB SFF segmentations and corresponding maps to make sure it produces the correct alignment.

Tom


On Jan 30, 2023, at 2:20 AM, Paul Korir via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi Tom/ChimeraX admin,

Just to clarify: what are the units of physical space in ChimeraX: Å or nm?

Kind regards,

Paul K. Korir, PhD
3D Visualisation Lead
CS3DB
EMBL-EBI

On 30/01/2023 08:51, Paul Korir wrote:

Hi Tom,

To the best of my understanding, ChimeraX displays images and associated segmentations in physical space not image space. However, segmentations are performed in image space. EMDB-SFF uses the first transform in the transforms_list field (with id=0) as the image-to-physical transform. (https://emdb-empiar.github.io/EMDB-SFF/v0.8.0.dev1/segmentation_da_xsd.html#segmentation_transform_list)

I've tested with two files having the same segmentation but different values for transform 0 and they render the same.

Could you please implement this feature in ChimeraX?

Kind regards,

--

Paul K. Korir, PhD
3D Visualisation Lead
CS3DB
EMBL-EBI

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users