Mercurial > repos > lldelisle > incucyte_stack_and_upload_omero
annotate upload_omero.sh @ 1:3c942429f610 draft default tip
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit de447190f0743b7f6a3b85e13f712fc07682af3c
author | lldelisle |
---|---|
date | Thu, 21 Dec 2023 17:04:46 +0000 |
parents | e1cba36becb2 |
children |
rev | line source |
---|---|
0
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
1 #!/bin/bash |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
2 omero_server="$1" |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
3 omero_user="$(cat $2 | awk 'NR==2{print $0}')" |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
4 omero_password="$(cat $2 | awk 'NR==3{print $0}')" |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
5 to_create=$3 |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
6 screen_name_or_id=$4 |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
7 |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
8 if [ "$to_create" = "create" ]; then |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
9 # Create a screen: |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
10 screen_name_or_id=$(omero obj -s ${omero_server} -u ${omero_user} -w ${omero_password} new Screen name="${screen_name_or_id}" | awk -F ":" 'END{print $NF}') |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
11 echo "Just created the new screen ${screen_name_or_id}" |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
12 fi |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
13 |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
14 echo "Start upload" |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
15 companion_file=$(ls output/*.companion.ome) |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
16 omero import -s ${omero_server} -u ${omero_user} -w ${omero_password} -T Screen:id:"${screen_name_or_id}" "${companion_file}" 2>&1 |
e1cba36becb2
planemo upload for repository https://github.com/lldelisle/tools-lldelisle/tree/master/tools/incucyte_stack_and_upload_omero commit 4ac9b1d66ba6857357867c8eccb6c9d1ad603364
lldelisle
parents:
diff
changeset
|
17 echo "Upload finished" |