Open will-moore opened 1 year ago
Strategy in place in omero-blitz/src/main/java/omero/cmd/graphs/DuplicateI.java
could be re-used
and we can introduce a "swapFileSet"
Created a script at https://gist.github.com/will-moore/56f03cd126dcac9981bceeb8e7cdb393
This uploads a directory of files (all files uploaded) to create a new Fileset.
Then it finds the images linked to the replacefileset
specified and re-links those Images
to the new Fileset.
The old Fileset is deleted.
The only step that is needed after this is a psql command that is printed by the script.
$ python replace_fileset.py OME_screenshot.zarr/ --replacefileset=138127
Importing: OME_screenshot.zarr/
Uploading: OME_screenshot.zarr/.zattrs
Uploading: OME_screenshot.zarr/.zgroup
Uploading: OME_screenshot.zarr/0/.zattrs
Uploading: OME_screenshot.zarr/0/.zgroup
Uploading: OME_screenshot.zarr/0/0/.zarray
Uploading: OME_screenshot.zarr/0/0/0/0/0/0/1
Uploading: OME_screenshot.zarr/0/0/0/1/0/0/0
Uploading: OME_screenshot.zarr/0/0/0/1/0/0/1
Uploading: OME_screenshot.zarr/0/0/0/3/0/0/1
Uploading: OME_screenshot.zarr/0/0/0/2/0/0/0
Uploading: OME_screenshot.zarr/0/0/0/2/0/0/1
Uploading: OME_screenshot.zarr/0/1/.zarray
Uploading: OME_screenshot.zarr/0/1/0/1/0/0/0
Uploading: OME_screenshot.zarr/0/1/0/3/0/0/0
Uploading: OME_screenshot.zarr/0/1/0/2/0/0/0
Uploading: OME_screenshot.zarr/OME/METADATA.ome.xml
orig_file 1768428
orig_file user-3_454/Blitz-0-Ice.ThreadPool.Server-53/2023-02/23/17-52-58.270/OME_screenshot.zarr/
orig_file .zattrs
Updating image OME_screenshot.png 257920
psql -U postgres -d OMERO-server -c "UPDATE pixels SET name = '.zattrs', path = 'user-3_454/Blitz-0-Ice.ThreadPool.Server-53/2023-02/23/17-52-58.270/OME_screenshot.zarr/' where id = 256818
Deleting Fileset 138127
In order to avoid the direct psql
command
We will need to do something like https://github.com/ome/omero-blitz/blob/master/src/main/java/omero/cmd/graphs/DuplicateI.java#L1019
via a new command e.g. swapFileset
The script above uses regular "upload" to create a Fileset. But for IDR we will really want an "in-place" Fileset creation. However, I don't know how to adapt the script to achieve that?? cc @joshmoore
Discussed today: https://github.com/ome/omero-upload/blob/master/src/omero_upload/library.py#L36 looks like a good place to start looking at in-place import
Test on training server 3 or 4
The library above creates file with conn.createOriginalFileFromFileObj()
and creates a file at managed-repo/Files/ID
which is then replaced with a sym-link to the actual in-place file.
Is that what happens with a standard in-place import @sbesson? It seems not, because in general on IDR, when you check the paths to files in a Fileset, these are not of that form with Files
but are like demo_2/2015-11/23/16-25-15.579/Meas_03(2012-07-31_13-12-10)/005010001.flex
Perhaps I can create the symlinks in the ManagedRepository, similar to https://github.com/IDR/idr0125-way-cellpainting/blob/main/scripts/symlinks.bash and then create an OriginalFile object, simply passing it the path...?
To test creation of a Fileset, can try to create symlinks as above, then create the Fileset from there.
First, try to import a test image into a test server. Use idr0125-pilot, since I have been using this as a test server and creating symlinks there etc...
Try to connect locally...
$ ssh pilot-idr0125 -L 40064:localhost:4064
then
$ omero import -d 15301 OME_screenshot.png
# login to localhost:40064
Fileset:5286801
$ omero import -d 15301 --depth=20 OME_screenshot.zarr/
Fileset:5286802
I assume that if a File doesn't exist for an Original File based on it's ID: e.g. 4879195
is in:
$ ls /data/OMERO/Files/Dir-004/Dir-879
then OMERO uses the path and name to find the file directly?
E.g. from import above: Original File: 48780012
, path: demo_2/Blitz-0-Ice.ThreadPool.Server-25/2023-03/06/15-59-36.479/OME_screenshot.zarr/
name: .zattrs
.
Test on idr0054 Tonsil 2
image: https://idr.openmicroscopy.org/webclient/?show=image-5025552
NGFF data is at...
$ ssh pilot-idrtesting
$ ls /ngff/idr0054
Tonsil 2.ome.zarr
So we want to try an in-place import to the server there. Unfortunately that server doesn't have the original pattern file imported image, but we can use the NGFF image instead...
e.g. use this to access via web...
ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' pilot-idrtesting-omeroreadwrite -L 1080:localhost:80
NGFF Image has been imported previously (regular ZarrReader import) at:
demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/Tonsil 2.ome.zarr/
So we want to create symlinks:
$ ssh pilot-idrtesting
sudo -u omero-server -s
cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557
mkdir ngff
cd ngff
ln -s "/ngff/idr0054/Tonsil 2.ome.zarr" "Tonsil 2.ome.zarr"
Using script at https://gist.github.com/will-moore/671a9f971f49661d097aa1655476878e
$ sudo -u omero-server -s
$ cd
$ pwd
/opt/omero/server
$ vi inplace_fileset.py
# paste in script above and save...
$ source /opt/omero/server/venv3/bin/activate
$ omero login demo@localhost
$ python inplace_fileset.py 9353 9353
...
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr .zattrs 33 1a45bdb742869f84fd71ae0fd67f79f1b26923fe
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0 .zattrs 9024 d1081971a9fa36eab85dfc677c8d41fdbcd71ef8
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0 .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/0 .zarray 328 a902050bf764318cdb65511209294d576723e7d2
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/1 .zarray 328 5acab8b416b346283b6fe770c205aa40f92d784e
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/2 .zarray 324 0be6b77260346499af5633a763571753660ee9ab
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/3 .zarray 324 daad3d12d69b2c5e1daa6499a2ac9d15027444fc
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/4 .zarray 324 5d9f748f84e3e21f8e77d8b47e8742cacde376db
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME .zattrs 24 156e48269827cb4611d5a3899d862c60c8f483f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME METADATA.ome.xml 2391 8f01227852e065e2bd8ac6d82be8644654089898
Created new_fileset 9363
Updating image METADATA.ome.xml 46035
psql -U postgres -d OMERO-server -c "UPDATE pixels SET name = '.zattrs', path = '/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr' where id = 46035
Delete Fileset:
$ omero delete Fileset:9353 --report
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: demo
omero.cmd.Delete2 Fileset:9353 ok
Steps: 6
Elapsed time: 3.818 secs.
Flags: []
Deleted objects
CommentAnnotation:33553
FilesetAnnotationLink:9303
OriginalFile:1067474-1067918
Fileset:9353
FilesetEntry:975569-976012
FilesetJobLink:45909-45913
IndexingJob:45913
JobOriginalFileLink:9353
MetadataImportJob:45910
PixelDataJob:45911
ThumbnailGenerationJob:45912
UploadJob:45909
Use omero config get --show-password
to get psql credentials etc.. then
PGPASSWORD=password psql -U omero -d idr -h 192.168.10.117
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr' where id = 46035;
UPDATE 1
But we get this error when trying to view the image:
cc @joshmoore @jburel That's the current state of where I'm at with creating a Fileset in-place... I don't know why I'm getting that exception. The path in the exception certainly points at correct files (via the symlink):
$ ls -alh "/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/"
total 8.0K
drwxrwxr-x. 4 dlindner dlindner 56 Feb 17 13:27 .
drwxrwxr-x. 3 dlindner dlindner 31 Feb 17 13:27 ..
drwxrwxr-x. 7 dlindner dlindner 81 Feb 17 13:27 0
drwxrwxr-x. 2 dlindner dlindner 60 Feb 17 13:27 OME
-rw-rw-r--. 1 dlindner dlindner 33 Feb 17 13:27 .zattrs
-rw-rw-r--. 1 dlindner dlindner 23 Feb 17 13:27 .zgroup
I assume the previous value wasn't escaped in anyway?
The server master.err log shows:
java.io.IOException: '.zarray' expected but is not readable or missing in store.
at com.bc.zarr.ZarrArray.open(ZarrArray.java:106)
"escaped in anyway" - you mean the file path escaping of white-space? Is that needed when I use quotes in:
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr' where id = 46035;
Looking for the ".zarray" files, they seem to be there...
$ cd "/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/"
$ find ./ -name ".zarray"
./0/0/.zarray
./0/1/.zarray
./0/2/.zarray
./0/3/.zarray
./0/4/.zarray
Ah, I wonder if the ".zattrs" that I'm pointing to in this case is the wrong file? I pointed at the image.zarr/.zattrs
in our previous tests on this, but that was the image itself, not a bioformats2raw.layout
, so maybe I should point to the /Tonsil 2.ome.zarr/OME/METADATA.xml
?...
UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME' where id = 46035;
UPDATE 1
Hmm - now I just get...
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME/METADATA.ome.xml
}
Full stack track is:
But I don't see any new errors added to the master.err
log.
The last error on that log is the one Josh reported above:
Checking image again...
ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
http://localhost:1080/webclient/?show=image-46035
This uses Fileset: 9363
with paths on server (from web UI):
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OMEMETADATA.ome.xml
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/4.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/3.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/2.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/1.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0/0.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/0.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr.zattrs
NB: These paths are missing the trailing /
compared to other images in IDR. Also, the whitespace might be causing problems...
Use $ omero delete Fileset:9363 --report --dry-run
to get a handle on OriginalFile IDs for this Fileset:
OriginalFile:1999565-1999576
then:
$ omero hql -q --limit=10 "select name, path from OriginalFile where id=1999576"
# | Col1 | Col2
---+------------------+--------------------------------------------------------------------------------------------------------------------------
0 | METADATA.ome.xml | /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil 2.ome.zarr/OME
Try to fix...
For 1999574, 1999575, 1999576:
$ omero obj update OriginalFile:1999574 path=/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/
For 1999565 - 1999574:
$ omero obj update OriginalFile:1999573 path=/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/
Update symlink, replacing link from "Tonsil 2.ome.zarr" with link from "Tonsil2.ome.zarr"
$ ssh pilot-idrtesting
$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff
$ ln -s "/ngff/idr0054/Tonsil 2.ome.zarr" "Tonsil2.ome.zarr"
$ ls -alh
total 0
drwxr-sr-x. 2 omero-server idr-data 55 Mar 21 10:23 .
drwxrwsr-x. 4 omero-server idr-data 43 Mar 7 16:23 ..
lrwxrwxrwx. 1 omero-server idr-data 31 Mar 7 16:23 Tonsil 2.ome.zarr -> /ngff/idr0054/Tonsil 2.ome.zarr
lrwxrwxrwx. 1 omero-server idr-data 31 Mar 21 10:23 Tonsil2.ome.zarr -> /ngff/idr0054/Tonsil 2.ome.zarr
$ rm "Tonsil 2.ome.zarr"
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr' where id = 46035;
UPDATE 1
Then tried to view image again - still fails:
Tried pointing at a few different locations, but each gave the same error
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr' where id = 46035;
UPDATE 1
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/0/' where id = 46035;
UPDATE 1
idr=> UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/' where id = 46035;
UPDATE 1
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/' where id = 46035;
UPDATE 1
cc @joshmoore @sbesson @jburel - I'm still stuck at the same point here, and this is currently a blocker for NGFF Fileset replacement.
I have created a new Fileset, with links to new OriginalFiles (except for chunks), based on path/name of NGFF files, where the path contains a symlink to files at /ngff/idr0054/Tonsil 2.ome.zarr
. Also updated the pixels
to point at symlinked files.
Discussed in IDR meeting today: Need Blitz log...
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
$ cd /opt/omero/server/OMERO.server
$ $ tail -f var/log/Blitz-0.log
Then go to http://localhost:1080/webclient/?show=image-46035 and open Preview Tab...
NB: lots of other activity adding to the Blitz log just now, so not limited to the action above...
cc @jburel @joshmoore @sbesson
Relevant part
Caused by: java.lang.IllegalArgumentException: Invalid index: -1
at loci.formats.FormatReader.coreIndexToSeries(FormatReader.java:1328)
at loci.formats.FormatReader.getSeriesCount(FormatReader.java:963)
at loci.formats.MetadataTools.populatePixels(MetadataTools.java:137)
at loci.formats.MetadataTools.populatePixels(MetadataTools.java:116)
at loci.formats.in.ZarrReader.initFile(ZarrReader.java:282)
cc @dgault
@dgault Any ideas what's failing here? Am I missing a File in the Fileset, or pointing to the wrong one from the Pixels?
The exception here looks as though the reader has failed to create any series metadata at all.
The reader logic for that part of the code is as below:
So it seems to have failed quite early on just locating the .zgroup and .zarray files
Looking at the pathset you listed, the top level folder had 2 sets of zgroup and zattrs, do you know where the first 2 OME.zgroup and OME.zattrs come from?
OME.zgroup
OME.zattrs
.zattrs
.zgroup
@dgault I "fixed" those paths above, so now in the web UI I see:
EDIT (31.3.2021 13:53 - after call with David): I see that a bunch of these are identical and WRONG! /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
Paths on server:
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/METADATA.ome.xml
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/OME/.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zarray
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zgroup
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/.zattrs
If I check they exist and look at the contents...
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/ngff/Tonsil2.ome.zarr/
[wmoore@pilot-idrtesting-omeroreadwrite Tonsil2.ome.zarr]$ ls -al OME/
total 12
drwxrwxr-x. 2 dlindner dlindner 60 Feb 17 13:27 .
drwxrwxr-x. 4 dlindner dlindner 56 Feb 17 13:27 ..
-rw-rw-r--. 1 dlindner dlindner 2391 Feb 17 13:27 METADATA.ome.xml
-rw-rw-r--. 1 dlindner dlindner 24 Feb 17 13:27 .zattrs
-rw-rw-r--. 1 dlindner dlindner 23 Feb 17 13:27 .zgroup
$ cat OME/.zattrs
{
"series" : [ "0" ]
}
$ cat OME/.zgroup
{
"zarr_format" : 2
}
So far I have been able to reproduce the same error using showinf when reading the dataset from pilot-idrtesting. If I copy the dataset locally using the exact same file structure then it reads just fine without the same issue. I will try to dig a bit further, seems something odd is going on.
The issue seems to be coming from within jzarr, it is able to find the attributes for the top level group but can't find any additional .group or .array files. The problem seems to be that the below code is not returning any matches, the internalRoot should be the top level folder and the suffix will be zgroup and zarray:
I'm having a hard time reproducing the same issue, but having the OME/.zgroup file does cause some issues on occasion (though that failure looks different from the original stack trace).
OK, I'm going to start from scratch....
ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
$ cd /ngff/idr0054
# in order to avoid path escaping issues, created a copy under `Tonsil_2.ome.zarr`
$ sudo cp -r Tonsil\ 2.ome.zarr/ Tonsil_2.ome.zarr/
$ ls -alh Tonsil_2.ome.zarr/OME/
total 12K
drwxr-xr-x. 2 root root 60 Mar 30 14:53 .
drwxr-xr-x. 4 root root 56 Mar 30 14:53 ..
-rw-r--r--. 1 root root 2.4K Mar 30 14:53 METADATA.ome.xml
-rw-r--r--. 1 root root 24 Mar 30 14:53 .zattrs
-rw-r--r--. 1 root root 23 Mar 30 14:53 .zgroup
$ source /opt/omero/server/venv3/bin/activate
$ export OMERODIR=/opt/omero/server/OMERO.server
$ omero login demo@localhost
$ omero import --transfer=ln_s --depth=10 -d 151 Tonsil_2.ome.zarr/OME/METADATA.ome.xml
...
2023-03-30 15:03:36,679 186064 [l.Client-0] INFO ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /data/ngff/idr0054/Tonsil_2.ome.zarr/OME/METADATA.ome.xml
Image:49072
Other imported objects:
Fileset:9403
==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:03:03.448
I ran the import twice to give 2 images to compare...
Image:49073
Other imported objects:
Fileset:9404
==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:02:02.928
Test import without chunks...
$ cd Tonsil_2.ome.zarr
$ sudo find -type f -name '0' -delete
$ sudo find -type f -name '1' -delete
$ sudo find -type f -name '2' -delete
$ cd ../
$ omero import --transfer=ln_s --depth=10 -d 151 Tonsil_2.ome.zarr/OME/METADATA.ome.xml
...
2023-03-30 15:34:38,151 13100 [l.Client-0] INFO ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /data/ngff/idr0054/Tonsil_2.ome.zarr/OME/METADATA.ome.xml
Image:49074
Other imported objects:
Fileset:9405
==> Summary
12 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:00:10.810
Then replace the chunks by copying over as above...
sudo rm -rf Tonsil_2.ome.zarr/
sudo cp -r Tonsil\ 2.ome.zarr/ Tonsil_2.ome.zarr/
The previously-imported images (49072 and 49073) are showing OK - can render in viewer etc. But 49074, imported without chunks is NOT showing any pixel data, even though the chunks were added back later: http://localhost:1080/webclient/?show=image-49074
Ooops - I was going to reproduce, but accidentally ran the delete chunk commands above from the parent /ngff/idr0054
directory instead of in Tonsil_2.ome.zarr
, so this deleted original chunks!
I took a local copy I can transfer over if that helps
I tried regenerating on pilot-zarr1-dev
but had issues getting bioformats2raw
setup. So Dom re-generated for me:
data/idr0054/Tonsil_2.zarr
Then I copied it to my home dir on pilot idrtesting
, then copied to Dom's /data/idr0054
...
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite -L 1080:localhost:80
$ rsync -av -e "ssh -A idr-pilot.openmicroscopy.org ssh" pilot-zarr1-dev:/data/idr0054/Tonsil_2.zarr . -P
$ cd /data/idr0054/
$ sudo cp -r /home/wmoore/Tonsil_2.zarr/ ./
$ ls
Tonsil 2.ome.zarr Tonsil_2.ome.zarr Tonsil_2.zarr
NB: re-generated data is Tonsil_2.zarr
(no ome.
).
Try to re-import... (x2)
source /opt/omero/server/venv3/bin/activate
export OMERODIR=/opt/omero/server/OMERO.server
omero import --transfer=ln_s --depth=10 -d 151 Tonsil_2.zarr/OME/METADATA.ome.xml
Image:49075
Other imported objects:
Fileset:9406
Make a copy to try importing without chunks (again)...
sudo cp -r Tonsil_2.zarr/ Tonsil2.zarr/
cd Tonsil2.zarr
# only delete *some* chunks
sudo find -type f -name '0' -delete
$ omero import --transfer=ln_s --depth=10 -d 151 Tonsil2.zarr/OME/METADATA.ome.xml
2023-03-31 10:50:42,172 81924 [l.Client-0] INFO ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /data/ngff/idr0054/Tonsil2.zarr/OME/METADATA.ome.xml
Image:49077
Other imported objects:
Fileset:9408
==> Summary
228 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:01:19.628
The Image imports OK with missing chunks. Try to symlink the missing chunks (whole image) into managed repo...
Needed to use sudo
to delete...
[wmoore@pilot-idrtesting-omeroreadwrite idr0054]$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116
[wmoore@pilot-idrtesting-omeroreadwrite 10-49-23.116]$ sudo rm -rf Tonsil2.zarr/
Then create symlink as omero-server
:
$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116
$ ln -s /ngff/idr0054/Tonsil_2.zarr Tonsil2.zarr
This restores missing chunks to Image:49077 !
New script: https://gist.github.com/will-moore/c1c13a79cad2a7e2ffe65eec18fe576c
Ran as above: https://github.com/IDR/idr-metadata/issues/652#issuecomment-1458544000
Ran several times, each time updating the FileSet on the image http://localhost:1080/webclient/?show=image-46035
$ python inplace_fileset.py 9410
followed by:
idr=> UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr' where id = 46035;
UPDATE 1
webclient UI:
Paths on server:
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/METADATA.ome.xml
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/.zgroup
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/.zattrs
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/4/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/3/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/2/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/1/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/0/.zarray
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/.zgroup
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/.zattrs
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zgroup
demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zattrs
Error:
Traceback (most recent call last):
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 538, in wrapped
retval = f(request, *args, **kwargs)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/decorators.py", line 597, in wrapper
context = f(request, *args, **kwargs)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/views.py", line 1754, in load_metadata_preview
rdefId = manager.image.getRenderingDefId()
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 7881, in wrapped
if not self._prepareRenderingEngine() \
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8157, in _prepareRenderingEngine
self._re = self._prepareRE(rdid=rdid)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 8136, in _prepareRE
re.load(ctx)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4796, in __call__
return self.handle_exception(e, *args, **kwargs)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omeroweb/webclient/webclient_gateway.py", line 2222, in handle_exception
super(OmeroWebSafeCallWrapper, self).handle_exception(e, *args, **kwargs)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 4793, in __call__
return self.f(*args, **kwargs)
File "/opt/omero/web/venv3/lib64/python3.6/site-packages/omero_api_RenderingEngine_ice.py", line 1192, in load
return _M_omero.api.RenderingEngine._op_load.invoke(self, ((), _ctx))
omero.ResourceError: exception ::omero::ResourceError
{
serverStackTrace = ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zattrs
at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:907)
at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653)
at ome.io.nio.PixelsService.getPixelBuffer(PixelsService.java:571)
at ome.services.RenderingBean$12.doWork(RenderingBean.java:2205)
at jdk.internal.reflect.GeneratedMethodAccessor327.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:568)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:249)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy100.doWork(Unknown Source)
at ome.services.util.Executor$Impl.execute(Executor.java:447)
at ome.services.util.Executor$Impl.execute(Executor.java:392)
at ome.services.RenderingBean.getPixelBuffer(RenderingBean.java:2202)
at ome.services.RenderingBean.load(RenderingBean.java:417)
at jdk.internal.reflect.GeneratedMethodAccessor1647.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy136.load(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor1647.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at ome.security.basic.BasicSecurityWiring.invoke(BasicSecurityWiring.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at ome.services.blitz.fire.AopContextInitializer.invoke(AopContextInitializer.java:43)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy136.load(Unknown Source)
at jdk.internal.reflect.GeneratedMethodAccessor1715.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at ome.services.blitz.util.IceMethodInvoker.invoke(IceMethodInvoker.java:172)
at ome.services.throttling.Callback.run(Callback.java:56)
at ome.services.throttling.InThreadThrottlingStrategy.callInvokerOnRawArgs(InThreadThrottlingStrategy.java:56)
at ome.services.blitz.impl.AbstractAmdServant.callInvokerOnRawArgs(AbstractAmdServant.java:140)
at ome.services.blitz.impl.RenderingEngineI.load_async(RenderingEngineI.java:316)
at jdk.internal.reflect.GeneratedMethodAccessor1714.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at omero.cmd.CallContext.invoke(CallContext.java:85)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy138.load_async(Unknown Source)
at omero.api._RenderingEngineTie.load_async(_RenderingEngineTie.java:248)
at omero.api._RenderingEngineDisp.___load(_RenderingEngineDisp.java:1223)
at omero.api._RenderingEngineDisp.__dispatch(_RenderingEngineDisp.java:2405)
at IceInternal.Incoming.invoke(Incoming.java:221)
at Ice.ConnectionI.invokeAll(ConnectionI.java:2536)
at Ice.ConnectionI.dispatch(ConnectionI.java:1145)
at Ice.ConnectionI.message(ConnectionI.java:1056)
at IceInternal.ThreadPool.run(ThreadPool.java:395)
at IceInternal.ThreadPool.access$300(ThreadPool.java:12)
at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:832)
at java.base/java.lang.Thread.run(Thread.java:829)
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/.zattrs
}
<WSGIRequest: GET '/webclient/metadata_preview/image/46035/?_=1680269059670'>
Going to summarise the logic in latest script https://gist.github.com/will-moore/c1c13a79cad2a7e2ffe65eec18fe576c
/data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr
which is a sym-link to /ngff/idr0054/Tonsil_2.zarr
.prefix
to be same as for the existing an existing Fileset (specified by ID). Q: what is this used for? What should it be? E.g. templatePrefix=demo_52/Blitz-0-Ice.ThreadPool.Server-6/2023-02/27/13-19-26.557/
/data/OMERO/ManagedRepository/
and add trailing /
to the pathOriginalFile
with name, path, size, hash and add to a newly created Filesetdemo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr
and the name to .zattrs
Thanks to @sbesson - We need to point the Pixels at the METADATA.ome.xml
instead of the .zattrs
.
After this:
UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME' where id = 46035;
Image at http://localhost:1080/webclient/?show=image-46035 is viewable!
So, I guess the next question is where to create the symlink from inside ManagedRepo to the in-place data...? E.g. if we're replacing a Fileset with paths like demo_2/2017-03/06/14-24-32.180/uod/idr/filesets/idr0033-rohban-pathways/20170214-original/images/41744/taoe005-u2os... what is the path we want to create? Do we create a new directory based on the date we're updating the Fileset?
Trying now with a Plate: http://localhost:1080/webclient/?show=plate-251
Fileset: 9401
9597 Image files:
Imported from:
data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/.zgroup
data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/.zattrs
data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/OME/METADATA.ome.xml
...
Paths on server:
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/B/2/0/2/0/0/3/0/0
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/A/7/0/1/0/1/7/0/0
...
Create symlink...
sudo -u omero-server -s
cd /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905
ln -s /data/ngff/idr0011/Plate2-TS-Blue-B.ome.zarr/ Plate2.zarr
$ ls -alh /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/
total 8.0K
drwxrwxr-x. 9 dlindner dlindner 101 Feb 16 11:20 .
drwxrwxr-x. 3 dlindner dlindner 70 Feb 16 11:20 ..
drwxrwxr-x. 8 dlindner dlindner 75 Feb 16 11:20 A
drwxrwxr-x. 8 dlindner dlindner 75 Feb 16 11:20 B
drwxrwxr-x. 8 dlindner dlindner 75 Feb 16 11:20 C
drwxrwxr-x. 9 dlindner dlindner 84 Feb 16 11:20 D
drwxrwxr-x. 10 dlindner dlindner 93 Feb 16 11:20 E
drwxrwxr-x. 9 dlindner dlindner 84 Feb 16 11:20 F
drwxrwxr-x. 2 dlindner dlindner 60 Feb 16 11:17 OME
-rw-rw-r--. 1 dlindner dlindner 3.7K Feb 16 11:20 .zattrs
-rw-rw-r--. 1 dlindner dlindner 23 Feb 16 11:17 .zgroup
So, I guess the next question is where to create the symlink from inside ManagedRepo to the in-place data...? E.g. if we're replacing a Fileset with paths like demo_2/2017-03/06/14-24-32.180/uod/idr/filesets/idr0033-rohban-pathways/20170214-original/images/41744/taoe005-u2os... what is the path we want to create? Do we create a new directory based on the date we're updating the Fileset?
As we progress towards this workflow, I suggest a review of the implementation and the design choices of the duplicate server command would be valuable- see https://github.com/ome/omero-blitz/blob/v5.6.2/src/main/java/omero/cmd/graphs/DuplicateI.java. Obviously, there are differences as the duplicate command re-uses existing files and duplicates all the image graph while this command replaces the existing files of images. However, there are several similarities in the way the command modifies the managed repository and creates new filesets without going through the whole ImportLibrary.
Created inplace_fileset3.py
from https://gist.github.com/will-moore/80db375fcbee419de69d7152b00732bd
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite
$ sudo -u omero-server -s
$ cd /opt/omero/server
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset3.py 9401 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr
Created new_fileset 9412
Cleaned-up the printed output, to make it suitable to paste into a psql
terminal:
But trying to view an Image from the Plate gives:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME/METADATA.ome.xml
Checking a different Plate, I see that the Pixels path
and name
don't refer to the parent OME/METADATA.ome.xml
but to the first chunk of an individual NGFF Image:
idr=> select path, name from Pixels where Image = 48865;
path | name
------------------------------------------------------------------------------------------------+------
demo_52/Blitz-0-Ice.ThreadPool.Server-7/2023-03/28/10-41-08.641/HT09.ome.zarr/A/10/0/0/0/0/0/0 | 0
(1 row)
So, let's try the same with image A1
, from the plate above, which is Image:48351
.
Get pixel ID...
idr=> select id, path, name from Pixels where Image = 48351;
id | path | name
-------+---------------------------------------------------------------------------------+------------------
48351 | demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME | METADATA.ome.xml
UPDATE pixels SET name = '0', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/A/1/0/0/0/0/0/0' where id = 48351;
Still failed with:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/A/1/0/0/0/0/0/0/0
}
I wondered whether setting the Pixels path
and name
to a file that is not an OriginalFile in the Fileset would cause a problem. So tried updating the inplace_fileset3.py
to also include any file named "0"
.
Ran again as above:
$ python inplace_fileset3.py 9412 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr
Created new_fileset 9413
Weclient UI says "9597 Image files:" in Fileset!
Didn't need to update Pixels with sql as it already points to the correct file. But still get this error:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/A/1/0/0/0/0/0/0/0
}
<WSGIRequest: GET '/webclient/metadata_preview/image/48351/?_=1680533166904'>
I just noticed that ALL Images for Plate:12 (idr0012-After) have the same path
& name
in Pixels. E.g. for Image at Field-2 of Well A4:
idr=> select path, name from Pixels where Image = 48866;
path | name
------------------------------------------------------------------------------------------------+------
demo_52/Blitz-0-Ice.ThreadPool.Server-7/2023-03/28/10-41-08.641/HT09.ome.zarr/A/10/0/0/0/0/0/0 | 0
This is the first OriginalFile
in the Fileset:
id | clientpath | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index
---------+------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
1136498 | data/ngff/idr0012/HT09.ome.zarr/A/10/0/0/0/0/0/0/0 | -56 | | 3980009 | | 3 | 52 | 3980009 | 9402 | 3006254 | 0
So, we are probably wrong to try and guess the path from the Image (I was using path/to/first/chunk
for image a A1
above). So, we want the first file in the Fileset...
idr=> select * from FilesetEntry where fileset = 9413 order by fileset_index;
id | clientpath | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index
---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
1153691 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/', '.zattrs', 3736, 'c75332d01920fcea5867c86fcf18234e854ff323'] | -56 | | 4051303 | | 3 | 52 | 4051303 | 9413 | 3025724 | 0
Update pixels:
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr' where id = 48351;
Still fails:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/.zattrs
}
<WSGIRequest: GET '/webclient/metadata_preview/image/48351/?_=1680533167005'>
Comparing with the successful Fileset replacement for Image above, where we set the Pixels path
and name
to the METADATA.ome.xml
file. In that Fileset, the first OriginalFile is actually the Tonsil2.zarr/.zattrs
.
So the Pixels doesn't always need to point to the first file in the Fileset:
idr=> select * from FilesetEntry where fileset = 9411 order by fileset_index;
id | clientpath | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index
---------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
1153343 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/', '.zattrs', 33, '1a45bdb742869f84fd71ae0fd67f79f1b26923fe'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025376 | 0
1153344 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/', '.zgroup', 23, '63de336a45370c236af207996ffd1bca2d7ae2f4'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025377 | 1
1153345 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/', '.zattrs', 9024, 'd1081971a9fa36eab85dfc677c8d41fdbcd71ef8'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025378 | 2
1153346 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/', '.zgroup', 23, '63de336a45370c236af207996ffd1bca2d7ae2f4'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025379 | 3
1153347 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/0/', '.zarray', 328, 'a902050bf764318cdb65511209294d576723e7d2'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025380 | 4
1153348 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/1/', '.zarray', 328, '5acab8b416b346283b6fe770c205aa40f92d784e'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025381 | 5
1153349 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/2/', '.zarray', 324, '0be6b77260346499af5633a763571753660ee9ab'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025382 | 6
1153350 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/3/', '.zarray', 324, 'daad3d12d69b2c5e1daa6499a2ac9d15027444fc'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025383 | 7
1153351 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/0/4/', '.zarray', 324, '5d9f748f84e3e21f8e77d8b47e8742cacde376db'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025384 | 8
1153352 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/', '.zattrs', 24, '156e48269827cb4611d5a3899d862c60c8f483f4'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025385 | 9
1153353 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/', '.zgroup', 23, '63de336a45370c236af207996ffd1bca2d7ae2f4'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025386 | 10
1153354 | ['demo_52/Blitz-0-Ice.ThreadPool.Server-11/2023-03/31/10-49-23.116/Tonsil2.zarr/OME/', 'METADATA.ome.xml', 2391, '8f01227852e065e2bd8ac6d82be8644654089898'] | -56 | | 4036097 | | 3 | 52 | 4036097 | 9411 | 3025387 | 11
(12 rows)
UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME' where id = 48351;
But that still fails:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2.zarr/OME/METADATA.ome.xml
}
<WSGIRequest: GET '/webclient/metadata_preview/image/48351/?_=1680533167026'>
cc @sbesson @dgault Any other ideas on what to try for Plates?
@will-moore Not sure this is terribly helpful, but http://localhost:1080/webclient/?show=plate-201 (=idr0010) is another zarr plate which is a bit different than idr0012 which you are tackling at the moment. The "difference" is that it imported okay also with previous ZarrReader version (https://github.com/ome/ZarrReader/releases/tag/v0.3.0), whereas the idr0010 you are having now needs https://github.com/ome/ZarrReader/releases/tag/v0.3.1.
Thanks @pwalczysko - I would have hoped that the Plate I was working with above would still be viewable on that server, since it has whatever update was needed to view it before I created a new Fileset. But, it might still be worth repeating my workflow on a new Plate, just to see if anything is different...
With Plate:201, (Fileset: 9351
) webclient UI for a selected Image shows:
5009 Image files:
Imported from:
data/ngff/idr0010/108-24.ome.zarr/.zgroup
...
Paths on server:
demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/
Instead of creating a single symlink to the Plate, this time we'll just use the already existing symlinks under ManagedRepo:
Using script: https://gist.github.com/will-moore/63af9d29f740d17c88554d0c51ad45c5
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite
$ sudo -u omero-server -s
$ cd
$ vi inplace_fileset4.py. # entered script and saved
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 9351 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr
templatePrefix demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/
demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/ .zattrs 31596 9298ed04011c98372ed04f09a8626129456cc64a
...
Created new_fileset 9414
Since we haven't changed the path in ManagedRepo, we don't need to update Pixels.
Viewing an Image works!
Webclient UI now shows Fileset has 2705 Image files:
since we don't have any chunks in new Fileset.
Just to check Pixels... - for Image at A1:
idr=> select * from Pixels where image = 45651;
id | permissions | methodology | physicalsizexunit | physicalsizex | physicalsizeyunit | physicalsizey | physicalsizezunit | physicalsizez | sha1 | significantbits | sizec | sizet | sizex | sizey | sizez | timeincrementunit | timeincrement | version | waveincrement | wavestart | creation_id | external_id | group_id | owner_id | update_id | dimensio
norder | image | pixelstype | relatedto | image_index | path | name | repo
-------+-------------+-------------+-------------------+---------------+-------------------+---------------+-------------------+---------------+------------+-----------------+-------+-------+-------+-------+-------+-------------------+---------------+---------+---------------+-----------+-------------+-------------+----------+----------+-----------+---------
-------+-------+------------+-----------+-------------+--------------------------------------------------------------------------------------------------+------+--------------------------------------
45651 | -56 | | µm | 1 | µm | 1 | | | Pending... | 16 | 2 | 1 | 696 | 520 | 1 | | | | | | 3486499 | | 3 | 52 | 3486499 |
1 | 45651 | 6 | | 0 | demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/A/1/0/0/0/0/0/0 | 0 | 0bec1452-6c35-417c-8ec7-88f8305b2b08
This path/name is to the first chunk of that Image and is the same for ALL Images in the Plate! But that is different from the first OriginalFile in the Fileset:
idr=> select * from FilesetEntry where fileset = 9414 order by fileset_index;
id | clientpath | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index
---------+-------------------------------------------------------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
1163288 | demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/.zattrs | -56 | | 4054338 | | 3 | 52 | 4054338 | 9414 | 3035321 | 0
1163289 | demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/.zgroup | -56 | | 4054338 | | 3 | 52 | 4054338 | 9414 | 3035322 | 1
The Pixels for images in that Plate DO point to the first OriginalFile in the Fileset that got replaced (first chunk of first Image):
idr=> select * from FilesetEntry where fileset = 9351 order by fileset_index;
id | clientpath | permissions | version | creation_id | external_id | group_id | owner_id | update_id | fileset | originalfile | fileset_index
--------+--------------------------------------------------------+-------------+---------+-------------+-------------+----------+----------+-----------+---------+--------------+---------------
965551 | data/ngff/idr0010/108-24.ome.zarr/A/1/0/0/0/0/0/0/0 | -56 | | 3471440 | | 3 | 52 | 3471440 | 9351 | 1046953 | 0
965552 | data/ngff/idr0010/108-24.ome.zarr/A/1/0/0/0/1/0/0/0 | -56 | | 3471440 | | 3 | 52 | 3471440 | 9351 | 1046954 | 1
So, we can replace Fileset:9351
(first File is first chunk of Image at A1) with a new Fileset: 9414
that contains NO chunks, and the Pixels for all Images still refer to path
& name
of the first chunk of Image at A1, and this works OK.
Let's try to update Pixels to point at first file of the Fileset or the METADATA.ome.xml'
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr' where id = 45651;
UPDATE 1
idr=> UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-12/2023-02/27/12-05-29.679/108-24.ome.zarr/OME' where id = 45651;
UPDATE 1
This Image is still working & viewable for BOTH of these (doesn't work if I add a typo etc).
So, OMERO/Bio-Formats doesn't seem too picky about which file in Fileset is named in Pixels. You can even name a File that isn't in the Fileset (e.g. first chunk).
This appears to differ for a Plate from the behaviour for an Image above, where updating the Pixels seemed necessary to be able to view the Image...?
Returning to Plate: http://localhost:1080/webclient/?show=plate-251 Let's try to use the original symlinks created for the original in-place import...
Fileset: 9413
created above
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idrtesting-omeroreadwrite
$ sudo -u omero-server -s
$ cd
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 9413 /data/OMERO/ManagedRepository/demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr
templatePrefix demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr/ .zattrs 3736 c75332d01920fcea5867c86fcf18234e854ff323
...
Created new_fileset 9416
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48364;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48360;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48382;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48377;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48379;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48390;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48373;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48386;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48368;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48376;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48359;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48355;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48397;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48371;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48378;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48380;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48396;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48370;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48384;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48367;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48358;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48387;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48388;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48398;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48374;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48372;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48354;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48393;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48399;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48375;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48365;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48361;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48351;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48385;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48381;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48383;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48394;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48395;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48357;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48363;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48362;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48366;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48391;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48356;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48352;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48389;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48392;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48353;
UPDATE pixels SET name = '.zattrs', path = 'demo_52/Blitz-0-Ice.ThreadPool.Server-5/2023-03/27/16-06-29.905/Plate2-TS-Blue-B.ome.zarr' where id = 48369;
Ran the sql commands and now ALL images are viewable!
Want to try replace older fileset on a different server.... (idr0125-pilot):
First copy plate to wmoore
home dir, then move to /ngff/idr0010 and chown to omero-server
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite
$ rsync -av -e "ssh -A idr-pilot.openmicroscopy.org ssh" idrtesting-omeroreadwrite:/data/ngff/idr0010/108-24.ome.zarr . -P
...
108-24.ome.zarr/OME/METADATA.ome.xml
1,662,776 100% 17.05MB/s 0:00:00 (xfr#5009, to-chk=0/15007)
sent 145,579 bytes received 700,071,909 bytes 5,129,798.45 bytes/sec
total size is 699,350,326 speedup is 1.00
$ sudo mkdir -p /ngff/idr0010
$ sudo mv 108-24.ome.zarr /ngff/idr0010/
$ sudo chown -R omero-server /ngff/
Create symlinks:
Existing data is at demo_2/2016-10/06/15-48-26.590/metadata/idr0010-doil-dnadamage/screenA/plates/108-24.pattern
$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/
$ ln -s /ngff/idr0010/108-24.ome.zarr 108-24.ome.zarr
$ ls -alh /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr/
total 84K
drwxrwxr-x. 15 omero-server wmoore 155 Feb 16 11:08 .
drwxr-xr-x. 3 omero-server root 29 Apr 4 14:48 ..
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 A
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 B
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 C
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 D
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 E
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 F
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 G
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 H
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 I
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 J
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 K
drwxrwxr-x. 34 omero-server wmoore 4.0K Feb 16 11:08 L
drwxrwxr-x. 2 omero-server wmoore 60 Feb 16 10:47 OME
-rw-rw-r--. 1 omero-server wmoore 31K Feb 16 11:08 .zattrs
-rw-rw-r--. 1 omero-server wmoore 23 Feb 16 10:47 .zgroup
Setup psql...
$ source /opt/omero/server/venv3/bin/activate
$ export OMERODIR=/opt/omero/server/OMERO.server
$ omero config get --show-password
$ PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102
idr=> select * from Image where id = 3053484;
id | acquisitiondate | archived | description | permissions | name | partial | series | version | creation_id | external_id | group_id | owner_id | update_id | experiment | fileset | format | imagingenvironment | instrument | objectivesettings | stagelabel
---------+---------------------+----------+-------------+-------------+-------------------+---------+--------+---------+-------------+-------------+----------+----------+-----------+------------+---------+--------+--------------------+------------+-------------------+------------
3053484 | 2007-05-20 13:24:22 | | | -56 | 108-24 [Scan A01] | | 0 | | 55956349 | | 3 | 2 | 55956349 | | 22281 | 118 | 1335887 | 12113 | 11663 |
(1 row)
idr=> select * from Fileset where id = 22281;
id | permissions | templateprefix | version | creation_id | external_id | group_id | owner_id | update_id
-------+-------------+---------------------------------+---------+-------------+-------------+----------+----------+-----------
22281 | -56 | demo_2/2016-10/06/15-48-26.590/ | | 55956337 | | 3 | 2 | 55956337
Fileset: 22281
Create new Fileset.... using inplace_fileset4.py
$ sudo -u omero-server -s
$ cd
$ vi inplace_fileset4.py
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 22281 /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr
Just want to update Pixels for 1 image to start...
idr=> select * from Pixels where image = 3053484;
id | permissions | methodology | physicalsizexunit | physicalsizex | physicalsizeyunit | physicalsizey | physicalsizezunit | physicalsizez | sha1 | significantbits | sizec | sizet | sizex | sizey | sizez | timeincrementunit | timeincrement | version | waveincrement | wavestart | creation_id | external_id | group_id |
owner_id | update_id | dimensionorder | image | pixelstype | relatedto | image_index | path | name | repo
---------+-------------+-------------+-------------------+---------------+-------------------+---------------+-------------------+---------------+------------------------------------------+-----------------+-------+-------+-------+-------+-------+-------------------+---------------+---------+---------------+-----------+-------------+-------------+----------+
----------+-----------+----------------+---------+------------+-----------+-------------+-------------------------------------------------------------------------------+----------------+--------------------------------------
3053484 | -56 | | µm | 1 | µm | 1 | | | 76eef7bf7e02c951f4293197be7047d38aa5955c | 16 | 2 | 1 | 696 | 520 | 1 | | | | | | 55956349 | | 3 |
2 | 55956895 | 1 | 3053484 | 6 | | 0 | demo_2/2016-10/06/15-48-26.590/metadata/idr0010-doil-dnadamage/screenA/plates | 108-24.pattern | cdf35825-def1-4580-8d0b-9c349b8f78d6
(1 row)
UPDATE pixels SET name = '.zattrs', path = 'demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr' where id = 3053484;
But no joy:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr/.zattrs
}
<WSGIRequest: GET '/webclient/metadata_preview/image/3053484/?_=1680618681730'>
Also tried pointing to METADATA.ome.xml but no:
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/2016-10/06/15-48-26.590/108-24.ome.zarr/OME/METADATA.ome.xml
Let's try the NGFF Image above (Tonsil 2) to replace Fileset on idr0125...
Copy data...
$ ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite -L 1080:localhost:80
$ rsync -av -e "ssh -A idr-pilot.openmicroscopy.org ssh" idrtesting-omeroreadwrite:/ngff/idr0054/Tonsil_2.zarr . -P
...
sent 11,288 bytes received 132,163,326 bytes 6,778,185.33 bytes/sec
total size is 132,095,381 speedup is 1.00
$ sudo mkdir -p /ngff/idr0054
$ sudo mv Tonsil_2.zarr /ngff/idr0054/
$ sudo chown -R omero-server /ngff/idr0054
Create symlink:
Existing data is at demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil 2.pattern
$ sudo -u omero-server -s
$ cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081
$ ln -s /ngff/idr0054/Tonsil_2.zarr Tonsil_2.zarr
$ ls -alh /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/
total 8.0K
drwxr-xr-x. 4 omero-server wmoore 56 Mar 31 10:24 .
drwxr-xr-x. 3 omero-server root 27 Apr 5 05:50 ..
drwxr-xr-x. 7 omero-server wmoore 81 Mar 31 10:24 0
drwxr-xr-x. 2 omero-server wmoore 60 Mar 31 10:24 OME
-rw-r--r--. 1 omero-server wmoore 33 Mar 31 10:24 .zattrs
-rw-r--r--. 1 omero-server wmoore 23 Mar 31 10:24 .zgroup
Fileset: 1591302
idr=> select * from Image where id = 5025552;
id | acquisitiondate | archived | description | permissions | name | partial | series | version | creation_id | external_id | group_id | owner_id | update_id | experiment | fileset | format | imagingenv
ironment | instrument | objectivesettings | stagelabel
---------+-----------------+----------+-------------+-------------+----------+---------+--------+---------+-------------+-------------+----------+----------+-----------+------------+---------+--------+-----------
---------+------------+-------------------+------------
5025552 | | | | -56 | Tonsil 2 | | 0 | | 131911941 | | 3 | 2 | 131911941 | | 1591302 | 118 |
| | |
idr=> select * from Fileset where id = 1591302;
id | permissions | templateprefix | version | creation_id | external_id | group_id | owner_id | update_id
---------+-------------+------------------------------------------------------------------+---------+-------------+-------------+----------+----------+-----------
1591302 | -56 | demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/ | | 131911854 | | 3 | 2 | 131911854
(1 row)
Create new Fileset.... using inplace_fileset4.py
sudo -u omero-server -s
$ cd
$ source /opt/omero/server/venv3/bin/activate
$ python inplace_fileset4.py 1591302 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr
templatePrefix demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/ .zattrs 33 1a45bdb742869f84fd71ae0fd67f79f1b26923fe
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/ .zattrs 9024 d1081971a9fa36eab85dfc677c8d41fdbcd71ef8
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/0/ .zarray 328 a902050bf764318cdb65511209294d576723e7d2
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/1/ .zarray 328 5acab8b416b346283b6fe770c205aa40f92d784e
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/2/ .zarray 324 0be6b77260346499af5633a763571753660ee9ab
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/3/ .zarray 324 daad3d12d69b2c5e1daa6499a2ac9d15027444fc
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/0/4/ .zarray 324 5d9f748f84e3e21f8e77d8b47e8742cacde376db
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/ .zattrs 24 156e48269827cb4611d5a3899d862c60c8f483f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/ METADATA.ome.xml 2391 8f01227852e065e2bd8ac6d82be8644654089898
Created new_fileset 5286811
UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr' where id = 5025552;
idr=> select * from Pixels where image = 5025552;
id | permissions | methodology | physicalsizexunit | physicalsizex | physicalsizeyunit | physicalsizey | physicalsizezunit | physicalsizez | sha1 | significantbits | sizec | sizet | sizex | sizey | si
zez | timeincrementunit | timeincrement | version | waveincrement | wavestart | creation_id | external_id | group_id | owner_id | update_id | dimensionorder | image | pixelstype | relatedto | image_index |
path | name | repo
---------+-------------+-------------+-------------------+---------------+-------------------+---------------+-------------------+---------------+------------+-----------------+-------+-------+-------+-------+---
----+-------------------+---------------+---------+---------------+-----------+-------------+-------------+----------+----------+-----------+----------------+---------+------------+-----------+-------------+-----
------------------------------------------------------------+------------------+--------------------------------------
5025552 | -56 | | | | | | | | Pending... | 8 | 27 | 1 | 2701 | 2701 |
1 | | | | | | 131911941 | | 3 | 2 | 131911941 | 1 | 5025552 | 5 | | 0 | demo
_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081 | Tonsil 2.pattern | cdf35825-def1-4580-8d0b-9c349b8f78d6
(1 row)
idr=> UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME' where id = 5025552;
UPDATE 1
But this fails:
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/Tonsil_2.zarr/OME/METADATA.ome.xml
}
<WSGIRequest: GET '/webclient/metadata_preview/image/5025552/?_=1680673769376'>
To check if idr0125-pilot
has ZarrReader that can read Tonsil_2.zarr
,
$ omero import -d 5601 --depth=100 --transfer=ln_s --skip=all Tonsil_2.zarr/OME/METADATA.ome.xml
Image:14706104
Other imported objects:
Fileset:5286812
==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:04:05.114
This is viewable OK. So, lets use the symlinks created during that import to create a NEW Fileset for the original image...
Replace the NGFF Fileset we created above: Fileset: 5286811
with a new one, using symlinks created at demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/
by the import we've just run...
Still as omero-server
user:
$ cd
$ python inplace_fileset4.py 5286811 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr
templatePrefix demo_2/Blitz-0-Ice.ThreadPool.Server-10/2019-03/15/15-28-44.081/
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/ .zattrs 33 1a45bdb742869f84fd71ae0fd67f79f1b26923fe
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME/ METADATA.ome.xml 2391 8f01227852e065e2bd8ac6d82be8644654089898
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME/ .zattrs 24 156e48269827cb4611d5a3899d862c60c8f483f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/ .zattrs 9024 d1081971a9fa36eab85dfc677c8d41fdbcd71ef8
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/ .zgroup 23 63de336a45370c236af207996ffd1bca2d7ae2f4
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/0/ .zarray 328 a902050bf764318cdb65511209294d576723e7d2
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/1/ .zarray 328 5acab8b416b346283b6fe770c205aa40f92d784e
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/2/ .zarray 324 0be6b77260346499af5633a763571753660ee9ab
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/3/ .zarray 324 daad3d12d69b2c5e1daa6499a2ac9d15027444fc
demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/0/4/ .zarray 324 5d9f748f84e3e21f8e77d8b47e8742cacde376db
Created new_fileset 5286813
UPDATE pixels SET name = '.zattrs', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr' where id = 5025552;
Update Pixels to point to METADATA.ome.xml
idr=> UPDATE pixels SET name = 'METADATA.ome.xml', path = 'demo_2/Blitz-0-Ice.ThreadPool.Server-14/2023-04/05/09-22-00.888/Tonsil_2.zarr/OME' where id = 5025552;
UPDATE 1
This works!
However, the image looks a bit different from previous thumbnail - more grainy?!
Template-prefix in this Fileset is the same as the Original Fileset. Seems not to matter that it is now different from the paths of the OriginalFiles in the Fileset.
To avoid re-importing Images when updating data to NGFF, we want to create a new Fileset for the NGFF data, and replace old Filesets.
Testing workflow:
Imported png: https://merge-ci.openmicroscopy.org/web/webclient/?show=image-257915
Converted same png to NGFF:
To be able to tell an NGFF image, removed chunk of alpha channel:
Edited import.py to upload ALL files in directory:
Import the Zarr to create a Fileset AND import the Fileset
Re-import this... NGFF_missing_chunk - as expected
https://merge-ci.openmicroscopy.org/web/webclient/?show=image-257917
Fileset ID: 138110
We want to update the Image:257915 (png) above to use Fileset:138110
The 'png' image now lists NGFF files in it's Fileset, but looks the same.
Now try deleting the png Fileset...
Now, trying to view the 'png' image gives:
psql -U postgres -d OMERO-server -c "UPDATE pixels SET name = '.zattrs', path = 'user-3_454/Blitz-0-Ice.ThreadPool.Server-5/2023-02/23/09-26-58.983/OME_screenshot.zarr' where id = 256813" UPDATE 1