@@ -24,6 +24,7 @@ def __init__(self, transaction, env_name="omero_env_0", project_code="", sample_
24
24
self ._sample_code = sample_code
25
25
26
26
### set exec. env
27
+
27
28
self ._conda_path = conda_home_path
28
29
if not conda_path is None :
29
30
self ._conda_path = conda_path
@@ -47,6 +48,7 @@ def __init__(self, transaction, env_name="omero_env_0", project_code="", sample_
47
48
self ._init_cmd_list .append ('export PATH=$PATH:' + self ._conda_path + 'envs/' + env_name + '/bin' )
48
49
49
50
# move to the dir where backendinterface.py lives for exec.
51
+
50
52
self ._init_cmd_list .append ('cd ' + self ._etl_path )
51
53
52
54
def fetchOpenBisSampleCode (self ):
@@ -63,6 +65,7 @@ def fetchOpenBisSampleCode(self):
63
65
64
66
def searchOpenBisSample (self , sample_code ):
65
67
# find specific sample
68
+
66
69
sc = SearchCriteria ()
67
70
sc .addMatchClause (SearchCriteria .MatchClause .createAttributeMatch (SearchCriteria .MatchClauseAttribute .CODE , sample_code ))
68
71
foundSamples = self ._search_service .searchForSamples (sc )
@@ -100,7 +103,7 @@ def requestOmeroDatasetId(self, project_code=None, sample_code=None):
100
103
return ds_id
101
104
102
105
def registerImageFileInOmero (self , file_path , dataset_id ):
103
-
106
+
104
107
cmd_list = list (self ._init_cmd_list )
105
108
cmd_list .append ( "python backendinterface.py -f " + file_path + " -d " + str (dataset_id ) )
106
109
@@ -123,6 +126,7 @@ def triggerOMETiffConversion(self):
123
126
pass
124
127
125
128
#ToDo Check if Metadata file is provided as defined
129
+
126
130
def extractMetadataFromTSV (self , tsv_file_path ):
127
131
tsvFileMap = {}
128
132
try :
@@ -147,6 +151,7 @@ def registerOmeroKeyValuePairs(self, image_id, property_map):
147
151
cmd_list = list (self ._init_cmd_list )
148
152
149
153
# string format: key1::value1//key2::value2//key3::value3//...
154
+
150
155
key_value_str = ""
151
156
for key in property_map .keys ():
152
157
key_value_str = key_value_str + str (key ) + "::" + str (property_map [key ]) + "//"
@@ -161,7 +166,6 @@ def registerOmeroKeyValuePairs(self, image_id, property_map):
161
166
process = Popen ( "/bin/bash" , shell = False , universal_newlines = True , stdin = PIPE , stdout = PIPE , stderr = PIPE )
162
167
out , err = process .communicate ( commands )
163
168
164
-
165
169
return 0
166
170
167
171
0 commit comments