This is a collection of python scripts written for the OMERO installation in the Microbial Imaging Facility (MIF), which is part of the ithree institute at the University of Technology Sydney.
These scripts are primarily for the handling of metadata. Details and instructions can be found from the links:
Abuses the dataset description to:
Removes key value pairs from files or a dataset.
The scripts were developed using the following resources:
conda create -n OMERO_CLI python=2.7 anaconda
Get the "OMERO python" package download
or directly from this link.
pip install zeroc-ice==3.6.4
Add the path to the library. Instructions from conda webpage
cd /Users/evenhuis/anaconda3/envs/OMERO_5.4_CLI
mkdir -p ./etc/conda/activate.d
mkdir -p ./etc/conda/deactivate.d
touch ./etc/conda/activate.d/env_vars.sh
touch ./etc/conda/deactivate.d/env_vars.sh
Add the following to the activate.d/env_vars.sh:
#!/bin/sh
export OMERO_PREFIX=~/Dropbox/MIF/OMERO/downloads_5.4.1/OMERO.py-5.4.1-ice36-b75
export ORIGPATH=$PATH
export ORIGPYTHONPATH=$PYTHONPATH
export PATH=$PATH:$OMERO_PREFIX/lib/python:$OMERO_PREFIX/bin
export PYTHONPATH=$PYTHONPATH:$OMERO_PREFIX/lib/python:$OMERO_PREFIX/bin
This appends the OMERO library to the search path. And the following in deactivate.d/env_vars.sh restores the path variabeles
export PATH=$ORIGPATH
export PYTHONPATH=$ORIGPYTHONPATH
unset ORIGPATH
unset ORIGPYTHONPATH
- Example
OMERO_USERNAME='USERNAME' OMERO_USER_PASSWORD='PASSWORD' OMERO_APP_URL='omero-app.server.edu' python download_files.py -h
Result:
usage: download_files.py [-h] [-p PROJECT [PROJECT ...]]
[-d DATASET [DATASET ...]] [-g [GROUP]] [-o] [-t]
Download datasets and projects from OMERO
optional arguments:
-h, --help show this help message and exit
-p PROJECT [PROJECT ...], --project PROJECT [PROJECT ...]
IDs of projects to download
-d DATASET [DATASET ...], --dataset DATASET [DATASET ...]
IDs of datasets to download
-g [GROUP], --group [GROUP]
name of group
-o, --orig download originals
-t, --tif download OME-TIFs
- Example
OMERO_USERNAME='USERNAME' OMERO_USER_PASSWORD='PASSWORD' OMERO_APP_URL='omero-app.server.edu' python download_files.py -d 2071 -p 759 -o
omero-app.research.uts.edu.au
Current user:
ID: 2
Username: 135553
Full Name: Moises Sacal Bonequi
['2071']
moises-dataset/
/gravatar.jpeg
['759']
moises-dataset/
/gravatar.jpeg
See LICENSE
This section provides machine-readable information about your scripts. It will be used to help generate a landing page and links for your work. Please modify all values on each branch to describe your scripts.
Base OMERO User Scripts repository
4.4
5.4
Christian Evenhuis
Microbial Imaging Facility University of Technology Sydeny
https://www.uts.edu.au/about/faculty-science/microbial-imaging-facility/about-us
Example script repository to be cloned, modified, and extended. This text may be used on OME resources to explain your scripts.