Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
4c512ad2
Commit
4c512ad2
authored
13 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
minor: sanofi - synchronize Matt's changes
SVN: 22680
parent
816b2332
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sanofi/dist/etc/sanofi-dropbox/dropbox-segmentation-images.py
+0
-53
0 additions, 53 deletions
...fi/dist/etc/sanofi-dropbox/dropbox-segmentation-images.py
with
0 additions
and
53 deletions
sanofi/dist/etc/sanofi-dropbox/dropbox-segmentation-images.py
deleted
100755 → 0
+
0
−
53
View file @
816b2332
"""
This is the segmentation images dropbox which accepts directories containing images.
Each directory will be registered as one dataset.
The naming convention of the directory is the following:
<raw-image-dataset-code>_<analysis-procedure>_<any-text>
e.g.
20110809142909177-826_AnalysisProcXYZ_myOverlays
The dataset with the code specified in the directory name will become a parent of the new dataset.
The new dataset is supposed to contain segmentation results (as images) of the parent dataset.
"""
import
utils
import
notifications
import
registration
from
ch.systemsx.cisd.openbis.generic.shared.basic.dto.api
import
ValidationException
reload
(
utils
)
# Can be switched on manually only after the module's code has been changed on the fly:
#reload(notifications)
#reload(registration)
def
createEmailUtils
():
global
experiment
global
plateCode
return
notifications
.
EmailUtils
(
state
,
incoming
,
experiment
,
plateCode
)
def
commit_transaction
(
service
,
transaction
):
createEmailUtils
().
sendSuccessConfirmation
()
def
rollback_service
(
service
,
ex
):
createEmailUtils
().
sendRollbackError
(
ex
)
# ---------------------
global
experiment
global
plateCode
if
incoming
.
isDirectory
():
experiment
=
None
plateCode
=
None
transaction
=
service
.
transaction
(
incoming
,
factory
)
tokens
=
utils
.
extractFileBasename
(
incoming
.
getName
()).
split
(
'
_
'
)
if
(
len
(
tokens
)
<
2
):
raise
ValidationException
(
"
Incoming directory name
"
+
incoming
.
getName
()
+
"
does not adhere to the naming convention <raw-image-dataset-code>_<analysis-procedure>_<any-text>
"
)
parentDatasetCode
=
tokens
[
0
]
analysisProcedureCode
=
tokens
[
1
]
(
plate
,
experiment
)
=
registration
.
findConnectedPlate
(
transaction
,
parentDatasetCode
)
plateCode
=
plate
.
getCode
()
registration
.
registerSegmentationImages
(
incoming
,
plate
,
parentDatasetCode
,
analysisProcedureCode
,
transaction
,
factory
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment