Skip to content
Snippets Groups Projects
Commit 35b113c0 authored by felmer's avatar felmer
Browse files

SSDM-4187: hcs-dropbox.py using new getServerInformation method for creating...

SSDM-4187: hcs-dropbox.py using new getServerInformation method for creating correct sample identifier.

SVN: 37623
parent e83945e0
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ EXPERIMENT_ID = "/%(SPACE_CODE)s/%(PROJECT_CODE)s/%(EXPERIMENT_CODE)s" % vars() ...@@ -12,6 +12,7 @@ EXPERIMENT_ID = "/%(SPACE_CODE)s/%(PROJECT_CODE)s/%(EXPERIMENT_CODE)s" % vars()
PLATE_CODE = "PLATE" PLATE_CODE = "PLATE"
PLATE_ID = "/%(SPACE_CODE)s/%(PLATE_CODE)s" % vars() PLATE_ID = "/%(SPACE_CODE)s/%(PLATE_CODE)s" % vars()
PLATE_ID_WITH_PROJECT = "/%(SPACE_CODE)s/%(PROJECT_CODE)s/%(PLATE_CODE)s" % vars()
PLATE_GEOMETRY_PROPERTY_CODE = "$PLATE_GEOMETRY" PLATE_GEOMETRY_PROPERTY_CODE = "$PLATE_GEOMETRY"
PLATE_GEOMETRY = "384_WELLS_16X24" PLATE_GEOMETRY = "384_WELLS_16X24"
...@@ -43,13 +44,17 @@ def create_experiment_if_needed(transaction): ...@@ -43,13 +44,17 @@ def create_experiment_if_needed(transaction):
def create_plate_if_needed(transaction): def create_plate_if_needed(transaction):
""" Get the specified sample or register it if necessary """ """ Get the specified sample or register it if necessary """
if transaction.serverInformation['project-samples-enabled'] == 'true':
plate_id = PLATE_ID_WITH_PROJECT
else:
plate_id = PLATE_ID
samp = transaction.getSample(PLATE_ID) samp = transaction.getSample(plate_id)
if None == samp: if None == samp:
exp = create_experiment_if_needed(transaction) exp = create_experiment_if_needed(transaction)
samp = transaction.createNewSample(PLATE_ID, 'PLATE') samp = transaction.createNewSample(plate_id, 'PLATE')
transaction.getLogger().info('Creating new plate: ' + PLATE_ID) transaction.getLogger().info('Creating new plate: ' + plate_id)
samp.setPropertyValue(PLATE_GEOMETRY_PROPERTY_CODE, PLATE_GEOMETRY) samp.setPropertyValue(PLATE_GEOMETRY_PROPERTY_CODE, PLATE_GEOMETRY)
samp.setExperiment(exp) samp.setExperiment(exp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment