* A note about channel selection in scripts.

OMERO reads the metadata in uploaded data and if names are assigned to channels these will be persisted. If no channel names exist OMERO will revert to assigning indices to the channels starting at zero. In those scripts where a user can select a channel to be processed, the channel is always selected (or assigned) using indices (0,1,2…) even if names exist for those channels.

Accessing scripts

Custom scripts can be accessed under the QBI dropdown menu in the script menu in either the desktop (Insight) or web clients.

Screen Shot 2015-05-18 at 3.08.55 pm

There are three categories of scripts

1. Image Processing

CellProfiler_Pipeline.py is a script which allows CellProfiler pipelines to be run on the OMERO server. CellProfiler is installed server-side (using a Docker image) and the script is used to execute pipelines by calling CellProfiler from the system command line. To use the script simply annotate an image with a pipeline (that has been thoroughly tested offline) and provide the script with the annotation ID of the pipeline. Let CellProfiler know what kind of data you are dealing with by choosing Fluorescence or Brightfield from Imaging Mode. Use the Channels to processoption to inform CellProfiler which channels are being processed. Select the index of the channel (starting at zero) from the dropdown menu and add another channel by pressing the ‘+’ button. Assign names to these channels using the Channel names option. These names should exactly match the names assigned in your pipeline. Add another channel using the ‘+’ button. Make sure the number of channel indices and names match.

Screen Shot 2015-05-18 at 3.11.04 pm

 

Clear_Outside.py uses ImageJ (specifically a Docker image of FIJI) server-side to clear the area outside a region of interest (ROI) on the image. The ROI should be created (and saved) on the image in Insight before executing the script. The ROI must be a Polygon. The script itself writes a FIJI-Jython script which is executed by calling FIJI from the command line. This script is a good example of how to use ImageJ server-side and also provides a good example of how to write Jython scripts which can be run client-side.

Screen Shot 2015-05-18 at 3.11.26 pm

 

Grid_Stitching.py is another example of how to run ImageJ within the OMERO server. This script calls the built-in ‘Grid Stitching’ plugin from FIJI using a Jython script which is called from the command line. The OMERO script interface provides the same inputs as the FIJI plugin and also allows the user to select a specific channel (by selecting Single Channel and providing a channel index starting at zero). It is also possible to stitch a single z-plane or a subset of all the z-planes (select either Single Z or Range Z).

Screen Shot 2015-05-18 at 3.11.44 pm

 

Images_From_ROIs_Advanced.py is a script which extends the built-in Images_From_ROIs.py script. The script provides a means to make new images from regions of interest that have been drawn on a parent image in Insight. The advanced version allows the new images to have a size > 4096×4096 and also allows the user to define the region using a Polygon region (the outside of which can be cleared). The user can also choose create a new image from all channels in the parent or from a list of specific channels (use Select Channels and provide channel indices – press ‘+’ to add additional channels).

Screen Shot 2015-05-18 at 3.12.16 pm

 

2. PALM/STORM

A number of scripts have been developed to deal specifically with localisation microscopy (PALM/STORM) datasets. Typically this data takes two forms – tabular data of molecule coordinates and super resolved reconstructed images (molecular density images). The following set of scripts perform functions on both types of data:

2D_Molecular_Density.py is a script which builds a super resolved image from tabular data of XY molecule coordinates with a pixel size provided by the user. The tabular data is uploaded and annotated to the raw data (a time series) and the user then provides the image ID and annotation ID of the tabular data. The script is capable of dealing with data from a number of sources (Zeiss data, QuickPALM etc.).

2D_Molecular_Density_Timelapse.py behaves as described above except it allows the tabular data to be split into (possibly overlapping) subsets which represent the reconstructed super resolved image as a time series.

Screen Shot 2015-05-18 at 3.13.07 pm

 

3D_Molecular_Density.py does a similar job as its 2D counterparts but deals with 3D data (Zeiss only). This script will generate a z-series from the tabular data where the number of slices is calculated based on a total z-range of 4um and the z-pixel size provided by the user.

Screen Shot 2015-05-18 at 3.13.25 pm

 

Get_Coordinates_In_ROIs.py is a script which extracts the XY molecule coordinates in an OMERO ROI drawn on a reconstructed super resolved image. The coordinates in the ROI are written to a CSV file which is subsequently annotated to the parent reconstructed image.

Screen Shot 2015-05-18 at 3.33.37 pm

 

Localisation_Density_In_ROIs.py calculates the density of XY molecule coordinates within a fixed distance from each localisation provided by the user (Radius). The density at each XY position is written to a CSV file and annotated to the parent reconstructed image.

Screen Shot 2015-05-18 at 3.36.32 pm

 

Nearest_Neighbours_In_ROIs.py calculates the distance to the nearest molecule for each localisation in a table of XY coordinates. A histogram of distances is formed and written to a CSV file which is annotated to the parent reconstructed image.

Screen Shot 2015-05-18 at 3.40.09 pm

 

Pair_Correlation_Function.py is a script which calculates either the auto-correlation function or cross-correlation function (if there are two channels) with OMERO ROIs drawn on a reconstructed super resolution dataset based on the following publication:

Veatch et al., “Correlation Functions Quantify Super-Resolution Images and Estimate Apparent
Clustering Due to Over-Counting”, PlosOne, 2012, DOI: 10.1371/journal.pone.0031457

The functions are calculated using a Fourier transform approach and so do not require the table of XY molecular coordinates to be attached to the image. The user can choose to fit one of two different models to the tabulated correlation data in order to extract statistics about clustering. The correlation data and fit parameters are written to a CSV file which is annotated to the parent image when the script completes.

Screen Shot 2015-05-18 at 3.40.27 pm

 

Ripley_Function.py calculates the Ripley L function for XY molecule coordinates within an OMERO ROI drawn on a reconstructed super resolution image. The user provides a maximum distance scale for the calculation (Max radius). The results are written to a CSV file and annotated to the parent image. (Note that in this implementation the Ripley function is calculated without edge correction.)

Screen Shot 2015-05-18 at 3.45.11 pm

 

Ripley_Function_Map.py performs the same function as above but calculates the Ripley L function at a single distance scale provided by the user and calculates an interpolated map of values to produce a spatial map of Ripley function values. The pixel size of the map generated is fixed at 50nm.

Screen Shot 2015-05-18 at 3.45.29 pm

 

3. Utils

Set_Pixel_Size.py is a utility script which allows the user to assign the pixel scale for an image (useful for example for TIFF files exported from Zen Black). Please use with caution!

Screen Shot 2015-05-18 at 3.45.59 pm