# HG changeset patch # User iuc # Date 1604618980 0 # Node ID f067504aa92a77dc8e8be5edd5577e0ad6607162 # Parent 5c743356df83b215bb2f9f808dbc2724efdfd918 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/idr_download commit 6b9df5f3cf2518e48eced93a2904a89776bde02d" diff -r 5c743356df83 -r f067504aa92a README.md --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Thu Nov 05 23:29:40 2020 +0000 @@ -0,0 +1,18 @@ +## 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 +``` diff -r 5c743356df83 -r f067504aa92a idr_download_by_ids.py --- a/idr_download_by_ids.py Mon Jul 06 19:33:59 2020 -0400 +++ b/idr_download_by_ids.py Thu Nov 05 23:29:40 2020 +0000 @@ -112,7 +112,7 @@ image_ids, channel=None, z_stack=0, frame=0, coord=(0, 0), width=0, height=0, region_spec='rectangle', - skip_failed=False, download_tar=False + skip_failed=False, download_tar=False, omero_host='idr.openmicroscopy.org', omero_secured=True, omero_username='public', omero_password='public' ): # basic argument sanity checks and adjustments prefix = 'image-' @@ -127,14 +127,12 @@ 'Got unknown value "{0}" as region_spec argument' .format(region_spec) ) - with ExitStack() as exit_stack: - # connect to idr conn = exit_stack.enter_context( BlitzGateway( - 'public', 'public', - host='idr.openmicroscopy.org', - secure=True + omero_username, omero_password, + host=omero_host, + secure=omero_secured ) ) # exit_stack.callback(conn.connect().close) @@ -356,6 +354,18 @@ p.add_argument( '--download-tar', action='store_true' ) + p.add_argument( + '-oh', '--omero-host', type=str, default="idr.openmicroscopy.org" + ) + p.add_argument( + '--omero-secured', action='store_false' + ) + p.add_argument( + '-u', '--omero-username', type=str, default="public" + ) + p.add_argument( + '-p', '--omero-password', type=str, default="public" + ) args = p.parse_args() if not args.image_ids: args.image_ids = sys.stdin.read().split() diff -r 5c743356df83 -r f067504aa92a idr_download_by_ids.xml --- a/idr_download_by_ids.xml Mon Jul 06 19:33:59 2020 -0400 +++ b/idr_download_by_ids.xml Thu Nov 05 23:29:40 2020 +0000 @@ -1,5 +1,5 @@ - + - download images from the Image Data Resource using image IDs @@ -16,10 +16,21 @@ - python-omero + python-omero pylibtiff Preferences -> Manage Information" && + exit 1 + #end if + #end if + mkdir downloads && cd downloads && #if str($image_ids.source) == 'link': python -c 'print("${image_ids.id_spec}".replace(",", "|").split("?show=")[-1].replace("|", "\n"))' @@ -39,10 +50,35 @@ #end if $skip_failed $download_tar - + #if $omero_instance_type.omero_instance =='priv': + -h '$omero_host' + $omero_secured + -u '$username' + -p '$password' + #end if 2> >(tee -a $out_log >&2) ]]> + + + + + + + + + [.A-Za-z0-9_-] + + + + + + + + @@ -104,9 +140,32 @@ + + + - + + + + + + + + + + + + + + + + + + + + + @@ -121,26 +180,12 @@ + + + - - - - - - - - - - - - - - - - - - + @@ -155,6 +200,9 @@ + + + @@ -179,6 +227,9 @@ + + + @@ -193,6 +244,9 @@ + + + @@ -219,6 +273,9 @@ + + + diff -r 5c743356df83 -r f067504aa92a test-data/test0.tiff Binary file test-data/test0.tiff has changed