Flow Cytometry Data Import with OMERO¶
Scope¶
Target group¶
Scientists, scientific assistants, technical employees
Aim¶
Enable iDiv users to upload and annotate their flow citometry data in the OMERO UFZ instance.
Prerequisites¶
- Install OMERO.insight on your local machine
- Install miniforge, omero-py and other required packages
- (Optional) Install RStudio and IFC package
Trigger event¶
The user wants to upload their image data in the OMERO UFZ instance for data management and sharing.
Categories¶
Applicable data types: Up to 140 different image file formats
Involved systems: OMERO UFZ instance, Jupyter Notebooks, (optional) RStudio
Addressed step in the data life cycle: storage, management
Procedure¶
%%{ init: { 'flowchart': { 'curve': 'linear'}} }%%
flowchart TD
A[["Trigger
Image Acquisition"]]:::trigger --> id1
A[["Trigger
Image Acquisition"]]:::trigger --> id2
A[["Trigger
Image Acquisition"]]:::trigger --> id3
subgraph id1 [Image Extraction with IFC]
C[Extract single images from the .cif file using R] --> D
D[Create a multi channel ome.tiff with Jupyter Notebook]
end
subgraph id2 [Image Extraction with Python/Bioformats]
E[Run the Python script *splitFile_hw.py*]
end
subgraph id3 [Image Extraction with Bioformats CLI]
F[Run the bfconvert command from the terminal]
end
id1 --> id4
id2 --> id4
id3 --> id4
subgraph id4 [Image Data Upload]
G[OMERO.insight]
end
id4 --> H
H[["Aim
Image Data Sharing and management"]]:::goal
click B href "#1-install-your-conda-environment-and-r-package-ifc"
click C href "#2-extract-single-images-from-the-cif-file-r-studio"
click D href "#3-create-multichannel-image-python"
click E href "#4-data-upload"
click F href "#5-metadata-enrichment"
classDef trigger stroke:#00589c
classDef goal stroke:#00589c
Tasks¶
- Install the conda environment
- Extract the single images from the .cif
- Data upload
- Metadata Enrichment
1. Install conda environment and R package IFC¶
This step need to be performed just once.
- In order to execute the python scripts to create the multichannel image, you need to create your conda environment with the necessary packages
- Information on how to create a conda environment are given in the docs folder of the GitLab repository (“How to install your conda environment”)
- In case you want to use R for image extraction: The IFC package can be found at the GitHub repository (https://github.com/gitdemont/IFC)
- In case you want to use PYthon for image extraction: The conda environment .yml file can be found in the GitLab repository
2. Prepare data for import - Data extraction from cif¶
Option 1 - IFC and Jupyter Notebooks:¶
- Single images can be extracted using the package IFC
- Run the script in the GitLab repository as an example (location: src/IFC_script). It can be also modified according to your needs
- Open the JupyterNotebook named “OMERO_preimport_iDiv.ipynb” and located at JupyterNotebooks/OMERO_import_iDiv.ipynb in the GitLab repository (script: src/omero_ufz_py/pre_import.py).
- Start the Jupyter Notebook locally by opening your terminal (type cmd in the search bar), activate your conda environment with omero-py and type “jupyter notebook”
- A tab in your browser will open and you can directly open the OMERO_preimport_iDiv.ipynb
- Just follow the instruction on the jupyter notebook to create the multichannel ome.tiff
Option 2 - Python script:¶
- Single images can be extracted using Python script
- Run the script in the GitLab repository as an example (location: running_CNN_on_OMERO/splitFile_hw.py)
Option 3 - Bioformats CLI:¶
- Download the Bioformats CLI from the OMERO website
- Open the folder bftools using the terminal
- Create a folder where to extract the images (you can do it using the terminal by typing:+
mkdir extraction_folder
- Type in the terminal the following command:
sh bfconvert --path to the cif file-- extraction_folder/%s_**filename**.ome.tiff
- Images will be extracted in the new created folder
More info on how to use the bioformat CLI is given here