diff --git a/screening/source/core-plugins/screening/4/dss/data-sources/imaging-db/plugin.properties b/screening/source/core-plugins/screening/4/dss/data-sources/imaging-db/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..6897aa06ba42e062b633d980acd924f2420331b6 --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/data-sources/imaging-db/plugin.properties @@ -0,0 +1,25 @@ +# +# Data source for the database storing image meta data. +# +# Variables: +# imaging-database.url-host-part +# The host and optionally port. Default is 'localhost'. +# imaging-database.kind +# Second part of the database name. Default value is 'prod'. +# screening-sql-root-folder +# Path to root folder of SQL scripts. Default value is an empty string. +# +version-holder-class = ch.systemsx.cisd.openbis.dss.etl.ImagingDatabaseVersionHolder +databaseEngineCode = postgresql +basicDatabaseName = imaging +urlHostPart = ${imaging-database.url-host-part:localhost} +databaseKind = ${imaging-database.kind:prod} +scriptFolder = ${screening-sql-root-folder:}sql/imaging +owner = +password = +# Credentials of a database user which is able to create a new database or roles in it. +# Leave empty to use the db engines defaults. +# Used only during the first start of the server or when server is upgraded to a new version. +adminUser = +adminPassword = + diff --git a/screening/source/core-plugins/screening/4/dss/drop-boxes/hcs-dropbox/hcs-dropbox.py b/screening/source/core-plugins/screening/4/dss/drop-boxes/hcs-dropbox/hcs-dropbox.py new file mode 100644 index 0000000000000000000000000000000000000000..aeff397fb86ad4e2fb72e967d993028e0be3822b --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/drop-boxes/hcs-dropbox/hcs-dropbox.py @@ -0,0 +1,84 @@ +import os +from ch.systemsx.cisd.openbis.dss.etl.dto.api.v1 import SimpleImageDataConfig +from ch.systemsx.cisd.openbis.dss.etl.dto.api.v1 import ImageMetadata +from ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto import Geometry + +SPACE_CODE = "TEST" +PROJECT_CODE = "TEST-PROJECT" +PROJECT_ID = "/%(SPACE_CODE)s/%(PROJECT_CODE)s" % vars() +EXPERIMENT_CODE = "DEMO-EXP-HCS" +EXPERIMENT_ID = "/%(SPACE_CODE)s/%(PROJECT_CODE)s/%(EXPERIMENT_CODE)s" % vars() + +PLATE_CODE = "PLATE1" +PLATE_ID = "/%(SPACE_CODE)s/%(PLATE_CODE)s" % vars() +PLATE_GEOMETRY_PROPERTY_CODE = "$PLATE_GEOMETRY" +PLATE_GEOMETRY = "384_WELLS_16X24" + + +def create_space_if_needed(transaction): + space = transaction.getSpace(SPACE_CODE) + if None == space: + space = transaction.createNewSpace(SPACE_CODE, None) + space.setDescription("A demo space") + +def create_project_if_needed(transaction): + project = transaction.getProject(PROJECT_ID) + if None == project: + create_space_if_needed(transaction) + project = transaction.createNewProject(PROJECT_ID) + project.setDescription("A demo project") + +def create_experiment_if_needed(transaction): + """ Get the specified experiment or register it if necessary """ + exp = transaction.getExperiment(EXPERIMENT_ID) + if None == exp: + create_project_if_needed(transaction) + print 'Creating new experiment : ' + EXPERIMENT_ID + exp = transaction.createNewExperiment(EXPERIMENT_ID, 'SIRNA_HCS') + + return exp + +def create_plate_if_needed(transaction): + """ Get the specified sample or register it if necessary """ + + samp = transaction.getSample(PLATE_ID) + + if None == samp: + exp = create_experiment_if_needed(transaction) + samp = transaction.createNewSample(PLATE_ID, 'PLATE') + samp.setPropertyValue(PLATE_GEOMETRY_PROPERTY_CODE, PLATE_GEOMETRY) + samp.setExperiment(exp) + + return samp + + +class MyImageDataSetConfig(SimpleImageDataConfig): + def extractImageMetadata(self, imagePath): + + basename = os.path.splitext(imagePath)[0] + (plate, well, tile, channelCode) = basename.split("_") + + image_tokens = ImageMetadata() + image_tokens.well = well + try: + image_tokens.tileNumber = int(tile) + except ValueError: + raise Exception("Cannot parse field number from '" + tile + "' in '" + basename + "' file name.") + + image_tokens.channelCode = channelCode + return image_tokens + + def getTileGeometry(self, imageTokens, maxTileNumber): + return Geometry.createFromRowColDimensions(maxTileNumber / 3, 3) + +def process(transaction): + incoming = transaction.getIncoming() + if incoming.isDirectory(): + imageDataset = MyImageDataSetConfig() + imageDataset.setRawImageDatasetType() + imageDataset.setGenerateThumbnails(True) + imageDataset.setUseImageMagicToGenerateThumbnails(False) + plate = create_plate_if_needed(transaction) + dataset = transaction.createNewImageDataSet(imageDataset, incoming); + dataset.setSample(plate) + transaction.moveFile(incoming.getPath(), dataset); diff --git a/screening/source/core-plugins/screening/4/dss/drop-boxes/hcs-dropbox/plugin.properties b/screening/source/core-plugins/screening/4/dss/drop-boxes/hcs-dropbox/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..9e4417bc5b6c1e72de88a5a7c7140f6ef6f05c6a --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/drop-boxes/hcs-dropbox/plugin.properties @@ -0,0 +1,13 @@ +# +# Drop box for HCS data sets +# +# Variables: +# incoming-root-dir +# Path to the directory which contains incoming directories for drop boxes. +incoming-dir = ${incoming-root-dir}/incoming-hcs +incoming-data-completeness-condition = auto-detection +top-level-data-set-handler = ch.systemsx.cisd.openbis.dss.etl.jython.v2.JythonPlateDataSetHandlerV2 +script-path = hcs-dropbox.py +storage-processor = ch.systemsx.cisd.openbis.dss.etl.PlateStorageProcessor +storage-processor.data-source = imaging-db +storage-processor.define-channels-per-experiment = false diff --git a/screening/source/core-plugins/screening/4/dss/drop-boxes/simple-dropbox/plugin.properties b/screening/source/core-plugins/screening/4/dss/drop-boxes/simple-dropbox/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..0c9653f03f362fbf44611691ad53ec344c73c009 --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/drop-boxes/simple-dropbox/plugin.properties @@ -0,0 +1,12 @@ +# +# Simple drop box which registers any file/folder +# +# +# Variables: +# incoming-root-dir +# Path to the directory which contains incoming directories for drop boxes. +incoming-dir = ${incoming-root-dir}/incoming-simple +incoming-data-completeness-condition = auto-detection +top-level-data-set-handler = ch.systemsx.cisd.etlserver.registrator.api.v2.JythonTopLevelDataSetHandlerV2 +script-path = simple-dropbox.py +storage-processor = ch.systemsx.cisd.etlserver.DefaultStorageProcessor diff --git a/screening/source/core-plugins/screening/4/dss/drop-boxes/simple-dropbox/simple-dropbox.py b/screening/source/core-plugins/screening/4/dss/drop-boxes/simple-dropbox/simple-dropbox.py new file mode 100644 index 0000000000000000000000000000000000000000..9067fe717ed98c987c8b56a8ef0ebc71cc83dc17 --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/drop-boxes/simple-dropbox/simple-dropbox.py @@ -0,0 +1,13 @@ +#! /usr/bin/env python +def process(transaction): + expid = "/TEST/TEST-PROJECT/DEMO-EXP-SIMPLE" + exp = transaction.getExperiment(expid) + + if None == exp: + exp = transaction.createNewExperiment(expid, "TEST-EXPERIMENT") + + dataSet = transaction.createNewDataSet() + + dataSet.setDataSetType("UNKNOWN") + dataSet.setExperiment(exp) + transaction.moveFile(transaction.getIncoming().getAbsolutePath(), dataSet) diff --git a/screening/source/core-plugins/screening/4/dss/image-overview-plugins/microscopy-image-overview/plugin.properties b/screening/source/core-plugins/screening/4/dss/image-overview-plugins/microscopy-image-overview/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..4bb0362520407453241cee719cb6ddaa3ba9753a --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/image-overview-plugins/microscopy-image-overview/plugin.properties @@ -0,0 +1,2 @@ +class = ch.systemsx.cisd.openbis.dss.generic.server.MergingImagesDownloadServlet +dataset-types = MICROSCOPY_IMAGE diff --git a/screening/source/core-plugins/screening/4/dss/maintenance-tasks/imaging-db-clean-up/plugin.properties b/screening/source/core-plugins/screening/4/dss/maintenance-tasks/imaging-db-clean-up/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..0376c8e51cf99da41257f764554ed8525580b596 --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/maintenance-tasks/imaging-db-clean-up/plugin.properties @@ -0,0 +1,8 @@ +# +# Maintenance task which does a database clean up by deleting all data sets deleted in application server. +# This task assumes that data source 'imaging-db' has been defined. +# +class = ch.systemsx.cisd.openbis.dss.etl.DeleteFromImagingDBMaintenanceTask +# specified in seconds. Here : every day +interval = 86400 +data-source = imaging-db diff --git a/screening/source/core-plugins/screening/4/dss/reporting-plugins/default-plate-image-analysis/plugin.properties b/screening/source/core-plugins/screening/4/dss/reporting-plugins/default-plate-image-analysis/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..349c4619c6a5579292141438761dcd8864d5ee22 --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/reporting-plugins/default-plate-image-analysis/plugin.properties @@ -0,0 +1,4 @@ +label = Image Analysis Results +class = ch.systemsx.cisd.openbis.dss.generic.server.plugins.ImageAnalysisMergedRowsReportingPlugin +dataset-types = HCS_ANALYSIS_.*WELL_FEATURES +properties-file = diff --git a/screening/source/core-plugins/screening/4/dss/reporting-plugins/feature-lists-aggregation-service/plugin.properties b/screening/source/core-plugins/screening/4/dss/reporting-plugins/feature-lists-aggregation-service/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..ca45c2a27cfed07f0a7611f3e972738a6b25c6ac --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/reporting-plugins/feature-lists-aggregation-service/plugin.properties @@ -0,0 +1,2 @@ +class = ch.systemsx.cisd.openbis.dss.generic.server.plugins.FeatureListsAggregationServicePlugin +label = Features Lists \ No newline at end of file diff --git a/screening/source/core-plugins/screening/4/dss/services/screening-dss-api-json/plugin.properties b/screening/source/core-plugins/screening/4/dss/services/screening-dss-api-json/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..ebfa05eeff69cf7bdd07a54ef649e9be3cd1ab8f --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/services/screening-dss-api-json/plugin.properties @@ -0,0 +1,2 @@ +class = ch.systemsx.cisd.openbis.dss.generic.server.DssScreeningApiJsonServlet +path = /rmi-datastore-server-screening-api-v1.json/* diff --git a/screening/source/core-plugins/screening/4/dss/services/screening-dss-api/plugin.properties b/screening/source/core-plugins/screening/4/dss/services/screening-dss-api/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..dc5e7415dae53f54739ef76efead59b349005b63 --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/services/screening-dss-api/plugin.properties @@ -0,0 +1,2 @@ +class = ch.systemsx.cisd.openbis.dss.generic.server.DssScreeningApiServlet +path = /rmi-datastore-server-screening-api-v1/* diff --git a/screening/source/core-plugins/screening/4/dss/services/screening-images/plugin.properties b/screening/source/core-plugins/screening/4/dss/services/screening-images/plugin.properties new file mode 100644 index 0000000000000000000000000000000000000000..fc95d81dad3e32d0a38027e13a7e7c62a867453f --- /dev/null +++ b/screening/source/core-plugins/screening/4/dss/services/screening-images/plugin.properties @@ -0,0 +1,5 @@ +# +# Image service +# +class = ch.systemsx.cisd.openbis.dss.generic.server.MergingImagesDownloadServlet +path = /datastore_server_screening/*