Skip to content
Python
Branch: master
Clone or download
Pull request Compare This branch is 38 commits ahead of ome:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MIF
cli_scripts
downloads
.gitignore
.travis.yml
CONTRIBUTING.md
Example.txt
LICENSE
README.md
parse_about

README.md

MIF developed scripts for OMERO

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:

Key_Val_from_Description.py

Abuses the dataset description to:

Key_Val_to_csv.py Key_value_from_csv.py

Key_Val_remove.py

Removes key value pairs from files or a dataset.

The scripts were developed using the following resources:

Installing OMERO CLI for 5.4.1

1. Create a virtual env for python 2.7:

conda create -n OMERO_CLI python=2.7 anaconda

2. Download the package from:

Get the "OMERO python" package download

or directly from this link.

3. Install the ICE library

pip install zeroc-ice==3.6.4

4. Add conda paths

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

Run downloads

  1. 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
  1. 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

Legal

See LICENSE

About

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.

Repository name

Base OMERO User Scripts repository

Minimum version

4.4

Maximum version

5.4

Owner(s)

Christian Evenhuis

Institution

Microbial Imaging Facility University of Technology Sydeny

URL

https://www.uts.edu.au/about/faculty-science/microbial-imaging-facility/about-us

Email

christian.evenhuis@gmail.com

Description

Example script repository to be cloned, modified, and extended. This text may be used on OME resources to explain your scripts.

You can’t perform that action at this time.