Walk through a nuclear markers analysis

role=“alert”>This page provides a brief introduction to PickCells via a walkthrough which takes you from the PickCells welcome screen to displaying a histogram to compare nuclear intensities in two different image samples.


Treating stem cells with a compound

Consider the following hypothesis:

If we treat stem cells with some compound A, then stem cells differentiate.

To test this hypothesis, we can perform the following biological experiment in the lab:

Here are some example images:


At this point we could qualitatively assess whether the markers are more expressed in the treated samples versus the control samples just by looking at the images. However, it is not always clear by eye whether a difference truly exists and, more importantly, we may miss sub-visual patterns that only quantification at the single cell level can reveal.

So, to quantify the level of differentiation with single cell resolution, we can create a PickCells experiment to conduct the following tasks:

  1. Image analysis: a. Load all colour images. b. Identify the nuclei in all images. c. Compute the average or integrated intensity within each nucleus for all channels i.e. for each marker of differentiation.
  2. Data analysis: a. View a histogram of nuclear intensities. b. Compare the intensities between the control and treated conditions.

How we use PickCells to carry out these tasks is now described.

Download sample images

Download the sample images archive file <a href=https://datasync.ed.ac.uk/index.php/s/VdTV5V5PmEWDc07/download?path=%2FSampleDatasets&files=Nuclear_Markers_Analysis.tar.gz" target="_blank">Nuclear_Markers_Analysis.tar.gz (password ‘pickcells’)

Unpack the contents of the .tar.gz file.

This creates a folder called Nuclear_Markers_Analysis/. This folder contains both raw and segmented images for both control and treated samples:




Start PickCells and log in

Start PickCells.

Once PickCells has started, click Log in.

If you have not logged in before, the New User… dialog will appear:

If you have already logged in before, the Login dialog will appear:

The user screen will appear.

Create a new experiment

To create a new experiment, click the Create a new experiment icon, located on the right-hand side in the My Experiments panel.

The Experiment Wizard will appear:

A new database will be created on your file system, in PickCellsExperiments/, which will be reopened every time you load this experiment. In this example, the database folder has name NuclearMarkers/.

Your experiment will now be visible on the user screen:

My experiments

Now, load your experiment:

A new workbench, with the experiment’s MetaModel View, will appear.


Import images

To import images, select Files => Import… => Colour Images.

This opens the import dialog.

You now need to select the images to import. The dialog offers two options:

We want to load images, so click Add Images.

A file browser will appear:

Once you have selected the images to load, a selected images dialog will display a thumbnail and a short description of each selected image.

Click OK.

Enter channel names and colours

The channel names dialog will appear which allows you, for each channel in the images, to select the following:

Enter the following Name values for each channel:

Channel names dialog

When you are done, click OK.

Wait for PickCells to import images

PickCells will import your selected images and a progress bar will appear while it does so.

To open your experiment’s database folder, select Locations => Database Folder

This folder will contain one .ics and one .ids file for each imported image.

When the images have been imported, the MetaModel View will update with objects representing the images.

Workbench after import of raw images

Explore the MetaModel View

Click on an object (a node) to centre the view on that object.

Right-click on an object to open a popup menu which allows you to get more information about the object or to delete the object. For example:

Identify nuclei

One of the most critical steps in image analysis is the accurate identification of the objects that need to be analysed 1 2. This step, termed image segmentation, consists of generating an image where each individual object is given a unique colour:

In PickCells, each unique colour provides a unique ID to each object allowing PickCells to identify features, such as shape, position or intensities.

For segmentation, PickCells offers two options:

  1. Segment images using NESSys (Nuclear Envelope Segmentation System) segmentation module, if you want to do segmentation from within PickCells.
  2. Import segmented images, if the segmentation modules available in PickCells aren’t suitable for your needs, or you have generated segmentation results using other tools.

We have segmented images, in Nuclear_Markers_Analysis/segmented_images/, so we’ll import these.

Import segmented images

Import the segmented images:

Import segmented images dialog

PickCells will check that the segmented images you import have the same dimensions as the colour images you have already imported.

When the images have been imported, the MetaModel View will update with metadata about the segmentation results (look for the Segmentation Result object).

Workbench after import of segmented images

Compute basic nuclei features

Once the segmentation images have been imported, we can create objects with the type of our choice, using the Intrinsic Features module.

To open the Intrinsic Features module, click the Intrinsic Features icon in the vertical toolbar: Intrinsic Features icon

The Intrinsic Features dialog will appear.

Intrinsic Features dialog

By default we can compute features on our segmented images, ‘seg’, creating a new object type, ‘Nucleus’, to record those features.

There are three classes of features that can be computed:

Recall from earlier that we want to Compute the average or integrated intensity within each nucleus for all channels i.e. for each marker of differentiation., so we will use Basic Features:

The dialog should look like:

Intrinsic Features dialog with only Basic Features selected

Now, click Compute.

The Intrinsic Features module will start to calculate the basic features, indicated via a progress bar in the bottom-left of the workbench:

Intrinsic Features module running

When complete, the MetaModel View will update to show the new Nucleus object, ‘Nucleus (Node)’, which has the computed features as properties:

Workbench after running the Intrinsic Features module

Remember, you can click on Nucleus to centre the MetaModel View on that object, and use right-click to open a popup menu which allows you to get more information about the object.

Visualise nuclei data

Visualisation modules allow us to display data within PickCells. In our example, recall that we have stained for differentiation and stemness markers so we’ll create histograms to view the distribution of the level of ‘differentiation’ and the level of ‘stemness’.

Display all nuclei intensities

To create a new histogram, click the Histogram icon in the horizontal toolbar: Histogram icon

A Histogram panel will appear. It will be empty as it has no data.

To select data to plot in the histogram, click the Change Data Set icon in the histogram panel’s horizontal toolbar: .

The Dataset Builder dialog will appear. On the left of the Dataset Builder dialog will be a MetaModel Browsing panel, for example:

MetaModel Browsing

These are objects whose data can be visualised within a histogram.

To select nuclei-related data:

The histogram will still be empty but the axes labels will change to ‘Dataset loaded, No dimensions defined’.

Now, we need to select the ‘dimension’ (i.e. property) to plot. First, plot the mean intensity per nucleus in channel 0, the differentiation marker:

Differentiation histogram

Now, let’s repeat the above, but this time create a new histogram which plots the mean intensity per nucleus in channel 1, the stemness marker:

Stemness histogram

Compare nuclei intensities between conditions

Recall that our goal is to compare distributions between the control and treated conditions. In order to do this, we will group our images by these conditions and then group nuclei based on the image group they belong to.

1. Create filters for control and treated images

First, we use the names of our images as a means of selecting which images have our control conditions (images with ‘Ctrl’ in their name) and which images have our treated conditions (images with ‘Treated’ in their name). To select these images we can use a ‘filter’.

To create a new filter, select Data => New Filter.

The Custom Filter dialog will appear. This allows us to choose the object for which we want to create a filter.

The Type of Filter dialog will appear with two options:

The name of the image is a property (or attribute) of the image so:

The query builder dialog will appear which allows us to define how the filter operates. We want our filter to accept an image if its ‘name’ attribute contains the string ‘Ctrl’:

The query builder should look like the following:

Query builder dialog


Now, repeat the above and create a filter called ‘Treated’ that filters Image objects that have the name ‘Treated’ in their ‘name’ property.

2. Create a dataset which groups nuclei based on the whether they in are control or treated images

Now, instead of visualising data from all nuclei objects, we will use a ‘path’ (introduced in What kind of data can I generate?) to select the nuclei objects to visualise based on the results of the filter.

Click the Histogram icon in the horizontal toolbar.

Click the Change Data Set icon in the histogram panel’s horizontal toolbar: .

First, we will find all paths between Image objects and Nucleus objects. To request that the Dataset Builder search for paths between these nodes:

The ‘?’ should be replaced by a small Image icon.

The ‘?’ should be replaced by a small Nucleus icon and the Path Definition should expand, and appear as follows:

Path Definition from Image to Nucleus

Now, we use our new image filter to group paths from Image nodes to Nucleus nodes into two categories - Control and Treated - so the targets of the paths (i.e. the Nucleus nodes) are also grouped into these two categories.

To apply the filter, right-click on the arrow within the Image element in the Path Definition’s Start block, and select Split here.

The Path Splitting panel will expand. This panel allows us to define how we want to group the objects that have been found, thereby splitting the path. We want to split Nucleus nodes by the Control and Treated categories, so:

Here, we are assuming that any image whose name does not contain the string ‘Ctrl’ is assumed to be a treated image. As we have only control and treated images this is a reasonable assumption, in this case.

Finally, rename the dataset:

The Dataset Builder should look like this:

Dataset Builder with split query path

Click Done at the bottom of the Dataset Builder dialog.

We have now created a dataset which only contains the Nucleus nodes associated with the Control images.

We can now plot the level of nuclear intensities in each of the conditions:

Differentiation histogram showing control and treated intensities

Here, we observe a small shift in intensity in the treated condition which may indicate that the treatment does induce differentiation in these cells.

Other explorations

There is much more that could be done within this experiment in order to identify more complex patterns in the data or simply to validate that there are no biases in the analysis. Here are a few ideas that you could try with this experiment:

  1. Create nuclei categories by setting a threshold on the level of differentiation marker e.g. phenotype: differentiated vs. non differentiated.
  2. View nuclei categories with an image overlay, to validate by eye the nuclei categories created with the thresholding technique.
  3. Display a pie chart to compare control vs. treated conditions and view percentages.

Where next?

This walkthrough only covers a small fraction of what can be done with PickCells. You could now:


  1. P. Keller, Science 2013, Imaging Morphogenesis: Technological Advances and Biological Insights ↩︎

  2. E. Meijering et al, Nature Biotechnology 2016, Imagining the future of bioimage analysis ↩︎