Skip to content

Commit

Permalink
Use generic server name; Fix CellPose arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
TorecLuik committed Feb 19, 2024
1 parent 07881eb commit 2befc27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions data/_SLURM_Image_Transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def save_as_ome_tiff(conn, image, folder_name=None):
f.write(piece)


def save_as_zarr(suuid, image, folder_name=None):
def save_as_zarr(conn, suuid, image, folder_name=None):
extension = "zarr"
name = os.path.basename(image.getName())
img_name = "%s.%s" % (name, extension)
Expand All @@ -216,8 +216,7 @@ def save_as_zarr(suuid, image, folder_name=None):

# command = f'omero zarr -s "$CONFIG_omero_master_host" -k "{suuid}" export --bf Image:{image.getId()}'
cmd1 = 'export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:/bin/java::")'
# TODO: replace "omeroserver" with a lookup, very likely the client/gateway knows the server
command = f'omero zarr -s "omeroserver" -k "{suuid}" --output {exp_dir} export Image:{image.getId()}'
command = f'omero zarr -s "{conn.host}" -k "{suuid}" --output {exp_dir} export Image:{image.getId()}'
cmd = cmd1 + " && " + command
print(cmd)
process = subprocess.Popen(
Expand Down Expand Up @@ -457,7 +456,7 @@ def get_t_range(size_t, script_params):
else:
save_as_ome_tiff(conn, img, folder_name)
elif format == 'ZARR':
save_as_zarr(suuid, img, folder_name)
save_as_zarr(conn, suuid, img, folder_name)
else:
size_x = pixels.getSizeX()
size_y = pixels.getSizeY()
Expand Down
2 changes: 1 addition & 1 deletion workflows/SLURM_CellPose_Segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def runScript():
client = omscripts.client(params)

# Unpack script input values
cellpose_version = unwrap(client.getInput("Version"))
cellpose_version = unwrap(client.getInput("CellPose_Version"))
zipfile = unwrap(client.getInput("Folder_Name"))
email = unwrap(client.getInput("E-mail"))
if email == _DEFAULT_MAIL:
Expand Down

0 comments on commit 2befc27

Please sign in to comment.