Mercurial > repos > lldelisle > max_projections_stack_and_upload_omero
comparison upload_omero.sh @ 0:a02156aa8bda draft
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/max_projections_stack_and_upload_omero commit 69a86e0a8ef82ce3c2232b99f72717a184f4d4cf
author | lldelisle |
---|---|
date | Thu, 12 Dec 2024 12:42:20 +0000 |
parents | |
children | 9be687213bc9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a02156aa8bda |
---|---|
1 #!/bin/bash | |
2 omero_server="$1" | |
3 omero_user="$(cat $2 | awk 'NR==2{print $0}')" | |
4 omero_password="$(cat $2 | awk 'NR==3{print $0}')" | |
5 to_create=$3 | |
6 project_name_or_id=$4 | |
7 dataset_name_or_id=$5 | |
8 | |
9 if [ "$to_create" = "both" ]; then | |
10 # Create a project: | |
11 project_name_or_id=$(${omero_path} obj -s ${omero_server} -u ${omero_user} -w ${omero_password} new Project name="${project_name_or_id}" | awk -F ":" 'END{print $NF}') | |
12 echo "Just created the new project ${project_name_or_id}" | |
13 fi | |
14 if [ "$to_create" = "both" ] || [ "$to_create" = "dataset" ]; then | |
15 dataset_name_or_id=$(${omero_path} obj -s ${omero_server} -u ${omero_user} -w ${omero_password} new Dataset name="${dataset_name_or_id}" | awk -F ":" 'END{print $NF}') | |
16 echo "Just created the new dataset ${dataset_name_or_id}" | |
17 ${omero_path} obj -s ${omero_server} -u ${omero_user} -w ${omero_password} new ProjectDatasetLink parent=Project:${project_name_or_id} child=Dataset:${dataset_name_or_id} | |
18 fi | |
19 echo "Start upload" | |
20 omero import -s ${omero_server} -u ${omero_user} -w ${omero_password} --depth 1 -T Dataset:id:"${dataset_name_or_id}" output 2>&1 | |
21 echo "Upload finished" |