forked from Helmholtz-UFZ/galaxy-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Helmholtz-UFZ#34 from rmassei/omero-upload
OMERO basic upload using omero-py
- Loading branch information
Showing
9 changed files
with
194 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# from https://github.com/TheJacksonLaboratory/ezomero/blob/main/tests/docker-compose.yml | ||
|
||
version: "3" | ||
|
||
services: | ||
|
||
database: | ||
image: "postgres:11" | ||
environment: | ||
POSTGRES_USER: omero | ||
POSTGRES_DB: omero | ||
POSTGRES_PASSWORD: omero | ||
networks: | ||
- omero | ||
volumes: | ||
- "database:/var/lib/postgresql/data" | ||
|
||
omero: | ||
# This container uses the tag for the latest server release of OMERO 5 | ||
# To upgrade to the next major release, increment the major version number | ||
image: "openmicroscopy/omero-server:latest" | ||
environment: | ||
CONFIG_omero_db_host: database | ||
CONFIG_omero_db_user: omero | ||
CONFIG_omero_db_pass: omero | ||
CONFIG_omero_db_name: omero | ||
CONFIG_omero_policy_binary__access: +read,+write,+image,+plate | ||
CONFIG_omero_glacier2_IceSSL_Ciphers: "HIGH:!DH" | ||
ROOTPASS: omero | ||
networks: | ||
- omero | ||
ports: | ||
- "6063:4063" | ||
- "6064:4064" | ||
volumes: | ||
- "omero:/OMERO" | ||
|
||
omeroweb: | ||
# This container uses the tag for the latest web release of OMERO 5 | ||
# To upgrade to the next major release, increment the major version number | ||
image: "openmicroscopy/omero-web-standalone:latest" | ||
environment: | ||
OMEROHOST: omero | ||
networks: | ||
- omero | ||
ports: | ||
- "5080:4080" | ||
|
||
networks: | ||
omero: | ||
|
||
volumes: | ||
database: | ||
omero: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
categories: | ||
- Imaging | ||
name: omero_upload | ||
description: Import images to an OMERO instance | ||
long_description: Import images to an OMERO.server from Galaxy | ||
owner: ufz | ||
remote_repository_url: https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/omero/omero_basic_upload | ||
homepage_url: https://github.com/ome/omero-py/ | ||
auto_tool_repositories: | ||
name_template: "{{ tool_id }}" | ||
description_template: "Wrapper command line tools of the omero-py package: {{ tool_name }}." | ||
suite: | ||
name: "suite_omero_py" | ||
description: "A suite of tools that brings the omery-py project into Galaxy." | ||
long_description: | | ||
OMERO.py provides an interface to the OMERO.blitz server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# OMERO import images | ||
|
||
## Set up user credentials on Galaxy to connect to other omero instance | ||
|
||
To enable users to set their credentials for this tool, | ||
make sure the file `config/user_preferences_extra.yml` has the following section: | ||
|
||
``` | ||
omero_account: | ||
description: Your OMERO instance connection credentials | ||
inputs: | ||
- name: username | ||
label: Username | ||
type: text | ||
required: False | ||
- name: password | ||
label: Password | ||
type: password | ||
required: False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<tool id="omero_import" name="OMERO Image Import" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT"> | ||
<description> with omero-py </description> | ||
<macros> | ||
<token name="@TOOL_VERSION@">5.18.0</token> | ||
<token name="@VERSION_SUFFIX@">0</token> | ||
</macros> | ||
<xrefs> | ||
<xref type="bio.tools">omero</xref> | ||
</xrefs> | ||
<requirements> | ||
<requirement type="package" version="@TOOL_VERSION@">omero-py</requirement> | ||
<!-- openjdk is needed: https://github.com/conda-forge/omero-py-feedstock/pull/16 --> | ||
<requirement type="package" version="21.0.2">openjdk</requirement> | ||
</requirements> | ||
<command detect_errors="exit_code"><![CDATA[ | ||
#import re | ||
mkdir folder && | ||
#for $image in $folder: | ||
#set image = $image | ||
#set image_identifier = re.sub('[^\s\w\-]', '_', str($image.element_identifier)) | ||
ln -s '${image}' folder/'${image_identifier}.$image.ext' && | ||
#end for | ||
omero import folder -T Dataset:name:$dataset_name | ||
-s $omero_host | ||
-p $omero_port | ||
-u $__user__.extra_preferences.get('omero|username', $test_username) | ||
-w $__user__.extra_preferences.get('omero|password', $test_password) | ||
> $log && | ||
omero logout | ||
]]></command> | ||
<inputs> | ||
<param name="folder" type="data" format="avi,bmp,btf,cif,csv,eps,fits,fli,gif,hdr,html,jp2,jpg,mov,mrc,ndpi,nhdr,nrrd,ome.tiff,par,pbm,pcx,pgm,png,ppm,psd,scn,sif,svs,tf2,tf8,tif,tif,tiff,top,txt,vms,wav,xml,zip" multiple="true" optional="false" label="Images to import into OMERO"/> | ||
<param name="dataset_name" type="text" optional="false" label="Dataset where to import the images"/> | ||
<param name="omero_host" type="text" label="OMERO host URL"> | ||
<validator type="regex" message="Enter a valid host location, for example, your.omero.server">^[a-zA-Z0-9._-]*$</validator> | ||
</param> | ||
<param name="omero_port" type="integer" value="4064" optional="false" label="OMERO port"/> | ||
<param name="test_username" type="hidden" value=""/> | ||
<param name="test_password" type="hidden" value=""/> | ||
</inputs> | ||
<outputs> | ||
<data name="log" format="txt"/> | ||
</outputs> | ||
<tests> | ||
<test> | ||
<param name="folder" value="input1.tif,input2.tif"/> | ||
<param name="dataset_name" value="galaxy_test_upload"/> | ||
<param name="omero_host" value="host.docker.internal"/> | ||
<param name="omero_port" value="6064"/> | ||
<param name="test_username" value="root"/> | ||
<param name="test_password" value="omero"/> | ||
<output name="log" value="omero_output.txt" ftype="txt"> | ||
<assert_contents> | ||
<has_n_lines n="2"/> | ||
</assert_contents> | ||
</output> | ||
<assert_stderr> | ||
<has_text_matching expression="IMPORT_DONE.*input1.tif"/> | ||
<has_text_matching expression="IMPORT_DONE.*input2.tif"/> | ||
<has_text text="files uploaded, 2 filesets created, 2 images imported, 0 errors"/> | ||
</assert_stderr> | ||
</test> | ||
</tests> | ||
<help> | ||
- This tool allows the import of images into a user-defined OMERO server | ||
|
||
- The user can define an existing dataset name where the images will be imported | ||
|
||
- If the dataset does not exist, a new one will be created | ||
</help> | ||
<citations> | ||
<citation type="doi">10.1038/nmeth.1896</citation> | ||
</citations> | ||
</tool> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Image:1 | ||
Image:2 |