Analyze OMERO data using MATLAB¶
Matlab is a powerful programming platform. We show here you can analyze data stored in OMERO using Matlab.
We will use https://docs.openmicroscopy.org/latest/omero/developers/Matlab.html as a reference.
Here we demonstrate how to analyze a batch of images associated with the paper Subdiffraction imaging of centrosomes reveals higher-order organizational features of pericentriolar material.
We will show:
How to connect to OMERO using MATLAB.
How to load data (dataset, channels information, binary data).
How to analyze images. The channel’s name will be used to determine the channel to analyze.
How to save the generated ROIs to OMERO.
How to save the results stored in a CSV file locally back to the OMERO.server as a FileAnnotation.
How to convert the CSV file into an OMERO.table.
Please read Install the OMERO.matlab toolbox first.
We will use:
Images from IDR idr0021.
For convenience, the IDR data have been imported into the training OMERO.server. This is only because we cannot save results back to IDR which is a read-only OMERO.server.
The script used in this document is
In the EDITOR tab create a new script:
Copy the code for the exercises from
Paste it into the new file and save the script under whatever name you like. DO NOT RUN the whole script.
To follow along the exercises only select the code block of each exercise and run it with “Evaluate Selection”:
Later exercises cannot be run unless the previous exercises have been executed successfully.
If you get stuck, right-click on the Workspace tab, clear the workspace and start again from the beginning:
Objectives: Connect to OMERO and print out your group ID.
Replace the USER and PASSWORD placeholders with your assigned credentials.
Select the code block of Exercise 1
Run it with “Evaluate Selection”.
Objectives: Load dataset and list the images contained in the dataset.
In OMERO.web find the dataset ‘matlab-dataset’ (in Project ‘matlab-project’)
Copy its ID
In the matlab code replace DATASET_ID with this ID
Run the code block.
Objectives: Read metadata; in particular find out which protein is the target in the images by looking through the image’s map annotations (key-value pairs). It is the same protein for all four sample images.
Select one image from the dataset
Load the map annotation linked to the image
Select the entry whose key is ‘Antibody Target’
Objectives: Find out in which channels the target protein is stained.
Iterate through the dataset
For each Image
Find the channel’s name using the LogicalChannel
Determine the index of the channel whose name matches the value found in the previous exercise
Objectives: Perform a simple image segmentation on one image and display the result.
Iterate through the dataset
Analyze the image whose name is siControl_N20_Cep215_I_20110411_Mon-1509_0_SIR_PRJ.dv
Retrieve the plane with
z=0, t=0, c=channel-1. Indexes start at 0 in OMERO.
Determine the mean, the standard deviation.
Objectives: Perform the image segmentation on the whole dataset and save the results as ROIs and CSV file. The CSV file is saved as a FileAnnotation
Objectives: Save the results as OMERO.table. This shows how to convert the CSV file into an OMERO.table
Run the code
Go back to OMERO.web
Select an image from the evaluated dataset
Expand the Tables harmonica. You should see the results there.
Double-click on the thumbnail of the image and inspect the ROIs in OMERO.iviewer.
Note: You can also use OMERO.parade on the OMERO.table data created in this manner. As OMERO.parade works only on Projects, in OMERO.web
Create a new Project
Put the analyzed Dataset into that Project
Attach the OMERO.table created in Exercise 7 to the Project
Now you can use OMERO.parade on the Project