-
Notifications
You must be signed in to change notification settings - Fork 16
Delete rnd #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pwalczysko
wants to merge
6
commits into
ome:master
Choose a base branch
from
pwalczysko:delete-rnd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Delete rnd #58
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4d999a6
Add script for deletion of rendering settings on images
pwalczysko e4edef0
Clean up, delete commented out code
pwalczysko 24c7a9b
Rewrite the script for bash as per Mark's comment
pwalczysko a57e074
Move the hql query cf. Mark's comment, delete a printout
pwalczysko 8da594f
Simplify the code cf. Mark's suggestions
pwalczysko 73f1f35
flake8 fixes
jburel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,39 @@ | ||
| #!/bin/bash | ||
| # | ||
| # This script deletes rnd settings on images in specified Datasets. | ||
| # Datasets can be specified either by name, such as | ||
| # DATASETNAME=svs bash delete_rendering.sh | ||
| # or by IDs (one or more, separated by comma), such as | ||
| # DATASETID=1868,2073 bash delete_rendering.sh | ||
|
|
||
| echo Starting | ||
| OMEROPATH=${OMEROPATH:-/opt/omero/server/OMERO.server/bin/omero} | ||
| PASSWORD=${PASSWORD:-ome} | ||
| HOST=${HOST:-outreach.openmicroscopy.org} | ||
| DATASETNAME=${DATASETNAME:-siRNAi-HeLa} | ||
| DATASETIDS=${DATASETID:-none} | ||
| NUMBER=${NUMBER:-50} | ||
| OMEUSER=${OMEUSER:-trainer-1} | ||
|
|
||
| $OMEROPATH login -u $OMEUSER -s $HOST -w $PASSWORD | ||
| result=`$OMEROPATH hql --ids-only --limit 1000 --style plain -q --all "SELECT id from Dataset WHERE name = '$DATASETNAME'"` | ||
| if [ "$DATASETIDS" = "none" ] | ||
| then | ||
| echo "none ID" | ||
| for i in $result | ||
| do | ||
| #remove the ordinal numbers | ||
| datasetids_raw+=${i#*,} | ||
| datasetids_raw+="," | ||
| done | ||
| dataset_number=${i%,*} | ||
| #remove the trailing comma | ||
| datasetids=${datasetids_raw%?} | ||
| else | ||
| datasetids=$DATASETIDS | ||
| dataset_number="specified datasets" | ||
| fi | ||
| echo 'Deleting rnd settings on '"$dataset_number"' Datasets:' $datasetids | ||
| $OMEROPATH delete --report Dataset/RenderingDef:$datasetids | ||
| $OMEROPATH logout | ||
| echo Stopping | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.