How to quantify contacts over time

Measuring how often and how long some objects come into contact with each other can be a useful tool in biological relationship analysis. This guide explains how grouping combined with tracking can provide this information.

Segmenting Objects

The key to identifying interactions is to tag subjects based on their proximity to or overlap with reference objects. To enable this step both types of objects must first be segmented and classified. Use any segmentation tool that is appropriate and use filters if necessary to identify only those segmented objects that are likely subject by, for example, not tagging objects outside of specific volume ranges or other features. 

Tagging contact events

Once both types of objects have been identified (more can be added if needed), the next step is to identify points of interaction. This can be based on proximity (if a subject-object is within a certain distance of a reference-object), or overlap (if part or whole of a subject-objects is within the bounds of a reference-object). 

The distance operation can be used if a specified distance is enough. 

In this case, we have configured the operation in the following way:

  1. Renamed the operation so the tag attached to the objects is "contact" for ease of reading the pipeline and results.
  2. Set the operation to change the colour of tagged objects to Cyan to easily spot interactions in the viewer. 
  3. Set the subject to be the objects that will be tracked and whose interaction we want to measure and set the reference be those the subjects come into contact with.
  4. Set the filter to be a distance below 2um. The distance, in this case, was set to be fairly generous due to the processing and segmentation of the objects, but it can be set to any value as needed, even 0, meaning that objects must touch for an interaction to be inferred. 
  5. Set the distance calculation to be based on the proximity of the geometries of both the subjects and references.
  6. While the option to store the distance feature is on, it is unnecessary for the purpose of tagging.

Alternative ways to tag contact can also work. If the Distances operator is unpractical because it is too much computing for the image using a distance map is absolutely fine. Also, it is possible to use the Compartments operation if contact is limited to the overlap of objects.

Tracking objects

Having tagged contact events we can then go on to tracking the objects.

Here the tracking operator is configured as follows:

  1. The input for the tracking operation is all the cells that can make contact, whether they do or not is not important at this stage. Use the menu in the operation title bar of the operation to select the input.
  2. The track colouring is fixed This is done so that we can more easily visualise contact events in the viewer later by combining the track colour with the object colour.
  3. The tracking parameters have been set according to the specific dataset. Check the knowledge base article on tracking for more information.
  4. The option to colour segment by tracks has been disabled so that the object colours are maintained.

Interpreting the data

Having tracked the objects, there are a few things that can be done to help interpret the data and extract the required information. Most of it is done from the Objects table.

Object Colouring

First, in the object colouring options, setting the track colour to match the segment colour makes is really easy to see in the viewer if a tracked object makes contact and where. 

And this colouring also affects the track editor:

Custom Features

Finally to get the number of interaction we can create a custom feature for the number of track children with the tag "Contact".

We Start by opening the Custom Features editor and adding a new Group Statistics feature.

This new custom feature has been configured as follows:

  1. The name is set to reflect the data it represents. In this case, the number of children objects that make contact.
  2. The Feature on which this custom is configured has been set to the number of children (# Children).
  3. The Tag field has been set to only include objects with the tag "Contact".
  4. The value that is added as a column in the table is the Count.

When finished the number of children that make contact will appear in the objects table as a feature of the tracks.

This feature can also be added as a feature filter for the tracks to quickly get a count of tracks that make contact.


Image courtesy: Dr. B. Stolp, Heidelberg University, Center for Integrative Infectious Disease Research (CIID)