Open will-moore opened 1 year ago
Where do we get the paths for making the mkdir command?
The output sql shows the path.
I see that all the examples have _converted in them. Is this part of the API?
It's hard-coded in the script at the moment but otherwise pretty arbitrary.
The // in the output is also arbitrary but you are right we could print the target directory there. 👍🏼
On idr0125-pilot...
Created conda
environment mkngff
and installed omero-py
and omero-mkngff
as above...
Get Database password...
export OMERODIR=/opt/omero/server/OMERO.server
omero config get --show-password
Use psql to get SECRET (last session ID):
PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102
idr=> select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 3) x order by x.id asc limit 1;
uuid
--------------------------------------
688fcb80-91f1-46ec-92ff-0547a1f6553x
(1 row)
export SECRET=688fcb80-91f1-46ec-92ff-0547a1f6553x
omero mkngff setup > setup.sql
omero login
omero mkngff sql --secret=$SECRET 5287119 "/idr0054/zarr/Tonsil 1.ome.zarr/" > idr0054.sql
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18 // 09-50-49.857 for fileset 5287119
SQL has paths like demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted//idr0054/zarr/Tonsil 1.ome.zarr/OME/
Create symlinks...
$ sudo -u omero-server mkdir /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted
$ sudo -u omero-server ln -s "/idr0054/zarr/Tonsil 1.ome.zarr" "/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/Tonsil 1.ome.zarr"
$ ls "/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/Tonsil 1.ome.zarr"
0 OME
$ PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102 -f setup.sql
CREATE FUNCTION
$ PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102 -f idr0054.sql
BEGIN
psql:idr0054.sql:952: ERROR: cannot set original repo property without secret key
CONTEXT: PL/pgSQL function _protect_originalfile_repo_insert() line 28 at RAISE
SQL statement "insert into originalfile
(id, permissions, creation_id, group_id, owner_id, update_id, mimetype, repo, path, name)
values (nextval('seq_originalfile'), old_perms, new_event, old_group, old_owner, new_event,
info[i][3], repo, info[i][1], uuid || info[i][2])
returning id"
PL/pgSQL function mkngff_fileset(bigint,character varying,character varying,character varying,text[]) line 42 at SQL statement
ROLLBACK
I don't know if that is a permissions issue?
I'm running the sql
commands there a bit differently from instructions above.
Trying those instructions...
$ sudo -u postgres psql idr < setup.sql
could not change directory to "/home/wmoore": Permission denied
CREATE FUNCTION
Maybe that's also a permissions issue, but don't know what's needed there?
Looking at the sql it has:
begin;
select mkngff_fileset(
5287119,
'3a4d3a3f-ac98-4b1a-84ab-XXXXXXXXXXX',
'cdf35825-def1-4580-8d0b-XXXXXXXXXXX',
'demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/',
array[
['demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted//idr0054/zarr/Tonsil 1.ome.zarr/', '.zattrs', 'application/octet-stream'],
...
the 3a4d3a3f...
value is the $SECRET
that still matches:
select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 3) x order by x.id asc limit 1;
but I don't know what the cdf35825-def1-4580-8d0b-XXXXXXXXXXX
value is?
but I don't know what the
cdf35825-def1-4580-8d0b-XXXXXXXXXXX
value is?
That's the repositoryID.
$ sudo -u postgres psql idr < setup.sql
could not change directory to "/home/wmoore": Permission denied
CREATE FUNCTION
This is just because sudo is trying to change the directory and can't. If you have correct SQL, it wasn't fatal.
psql:idr0054.sql:952: ERROR: cannot set original repo property without secret key
This will mean it's the wrong secret key.
With the instructions you provided for getting the secret key (at the top) it prints lots of info - including 3 session keys. I have tried to create a less-ambiguous way of getting the secret key. Is this the correct way to get the secret key?
select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 3) x order by x.id asc limit 1;
Part of the problem is that it's different on the pilots than it is from main servers. (It's based on the number of java processes that are started!)
OK, so it's different on pilots from other servers. So what should I do?
Trying this on idr0125-pilot
...
idr=> select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 3) x order by x.id asc limit 1;
uuid
--------------------------------------
3a4d3a3f-ac98-4b1a-84ab-5534e364f181
(1 row)
$ export SECRET=3a4d3a3f-ac98-4b1a-84ab-5534e364f181
Followed same steps as above and got the same error...
PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102 -f idr0054.sql
BEGIN
psql:idr0054.sql:952: ERROR: cannot set original repo property without secret key
So this seems to be not the right way to get the secret on the pilots. How do I need to adapt this to work on the pilots?
Sorry. The "limit 3" in the above is for a full server (with Indexer and PixelData process). Changing that to limit 1 should do the trick:
select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 1) x order by x.id asc limit 1;
idr=> select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 1) x order by x.id asc limit 1;
uuid
--------------------------------------
8add790d-7855-46f6-8239-c6a72937d572
(1 row)
export SECRET=8add790d-7855-46f6-8239-c6a72937d572
omero login
omero mkngff sql --secret=$SECRET 5287119 "/idr0054/zarr/Tonsil 1.ome.zarr/" > idr0054.sql
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18 // 09-50-49.857 for fileset 5287119
PGPASSWORD=****** psql -U omero -d idr -h 192.168.10.102 -f idr0054.sql
BEGIN
mkngff_fileset
----------------
5287366
(1 row)
COMMIT
Getting ResourceError
when viewing the image.
Need to update ZarrReader to latest merge build. Following steps at https://github.com/IDR/idr-metadata/issues/643#issuecomment-1543728125
Get link from https://merge-ci.openmicroscopy.org/jenkins/job/BIOFORMATS-build/499/default/artifact/bio-formats-build/ZarrReader/target/
sudo -u omero-server -s
ssh -A -o 'ProxyCommand ssh idr-pilot.openmicroscopy.org -W %h:%p' idr0125-omeroreadwrite -L 1080:localhost:80
wget https://merge-ci.openmicroscopy.org/jenkins/job/BIOFORMATS-build/499/default/artifact/bio-formats-build/ZarrReader/target/OMEZarrReader-0.3.2-SNAPSHOT-jar-with-dependencies.jar
$ mv OMEZarrReader-0.3.2-SNAPSHOT-jar-with-dependencies.jar OMEZarrReader.jar
$ rm /opt/omero/server/OMERO.server/lib/client/OMEZarrReader.jar
$ cp OMEZarrReader.jar /opt/omero/server/OMERO.server/lib/client/
$ rm /opt/omero/server/OMERO.server/lib/server/OMEZarrReader.jar
$ cp OMEZarrReader.jar /opt/omero/server/OMERO.server/lib/server/
# as regular user
$ sudo service omero-server restart
But I still see ResourceError
when viewing the image...
The contents of your _converted
directory are:
[jamoore@pilot-idr0125-omeroreadwrite log]$ ls /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/
Tonsil 1.ome.zarr
but the error messages says:
2023-08-08 13:38:15,237 INFO [ ome.services.util.ServiceHandler] (l.Server-2) Excp: ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/idr0054/zarr/Tonsil 1.ome.zarr/OME/METADATA.ome.xml
i.e. there are two extra directory paths: "idr0054/zarr/"
# remove symlink and re-create...
rm "/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/Tonsil 1.ome.zarr"
sudo -u omero-server mkdir -p /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/idr0054/zarr/
sudo -u omero-server ln -s "/idr0054/zarr/Tonsil 1.ome.zarr" "/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/idr0054/zarr/Tonsil 1.ome.zarr"
Looks better...
$ ls /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/idr0054/zarr/Tonsil\ 1.ome.zarr/
0 OME
But I still see:
serverStackTrace = ome.conditions.ResourceError: Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/idr0054/zarr/Tonsil 1.ome.zarr/OME/METADATA.ome.xml
at ome.io.nio.PixelsService.createBfPixelBuffer(PixelsService.java:907)
at ome.io.nio.PixelsService._getPixelBuffer(PixelsService.java:653)
Hmmm..... did you possibly run the script twice? In the server log I see:
Caused by: ome.conditions.SecurityViolation:
file demo_2/Blitz-0-Ice.ThreadPool.Server-6/2023-05/18/09-50-49.857_converted/idr0054/zarr/Tonsil 1.ome.zarr/0/.zattrs
does not have a unique readable fileset
Trying with a different Fileset on idr0125-pilot...
$ omero mkngff sql --secret=$SECRET 5287120 "/idr0054/zarr/Tonsil 2.ome.zarr/" > idr0054_2.sql
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18 // 09-51-02.628 for fileset 5287120
Extrapolate the dirs we need for symlinks... demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18/09-51-02.628_converted/
sudo -u omero-server mkdir -p /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18/09-51-02.628_converted/idr0054/zarr/
sudo -u omero-server ln -s "/idr0054/zarr/Tonsil 2.ome.zarr" "/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18/09-51-02.628_converted/idr0054/zarr/Tonsil 2.ome.zarr"
Run sql...
$ psql -U omero -d idr -h 192.168.10.102 -f setup.sql
CREATE FUNCTION
$ psql -U omero -d idr -h 192.168.10.102 -f idr0054_2.sql
BEGIN
mkngff_fileset
----------------
5287367
(1 row)
COMMIT
Rendering image...
serverExceptionClass = ome.conditions.ResourceError
message = Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18/09-51-02.628_converted/idr0054/zarr/Tonsil 2.ome.zarr/OME/METADATA.ome.xml
Blitz log has same error as before:
2023-08-16 10:04:34,084 ERROR [ ome.io.nio.PixelsService] (l.Server-6) Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18/09-51-02.628_converted/idr0054/zarr/Tonsil 2.ome.zarr/OME/METADATA.ome.xml
java.lang.RuntimeException: ome.conditions.SecurityViolation: file demo_2/Blitz-0-Ice.ThreadPool.Server-1/2023-05/18/09-51-02.628_converted/idr0054/zarr/Tonsil 2.ome.zarr/.zattrs does not have a unique readable fileset
at ome.io.bioformats.BfPixelBuffer.reader(BfPixelBuffer.java:79)
Trying different server: idr0138-pilot
... install miniconda etc...
$ wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh
$ bash Miniconda3-py39_4.10.3-Linux-x86_64.sh
$ source /home/wmoore/.bashrc
$ conda create -n mkngff -c conda-forge -c ome omero-py bioformats2raw
$ conda activate mkngff
$ pip install 'omero-mkngff @ git+https://github.com/joshmoore/omero-mkngff@main'
$ psql -U omero -d idr -h 192.168.10.231
psql (11.16)
Type "help" for help.
idr=> select uuid from (select * from session where node = 0 and owner = 0 and defaulteventtype = 'Sessions' order by id desc limit 1) x order by x.id asc limit 1;
uuid
--------------------------------------
e1571d5f-ff16-4e79-b0d3-0352d4c4df44
(1 row)
Need to mount BIA s3 on idr0138-pilot
....
sudo mkdir /bia-integrator-data && sudo /opt/goofys --endpoint https://uk1s3.embassy.ebi.ac.uk/ -o allow_other bia-integrator-data /bia-integrator-data
$ omero mkngff sql --secret=$SECRET 1591301 "/idr0054/zarr/Tonsil 1.ome.zarr/" > idr0054.sql
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15 // 15-27-40.023 for fileset 1591301
demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023
sudo -u omero-server mkdir -p /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023_converted/idr0054/zarr/
$ sudo -u omero-server ln -s "/idr0054/zarr/Tonsil 1.ome.zarr" "/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023_converted/idr0054/zarr/Tonsil 1.ome.zarr"
$ ls /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023_converted/idr0054/zarr/Tonsil\ 1.ome.zarr/
$ psql -U omero -d idr -h 192.168.10.231 -f setup.sql
$ psql -U omero -d idr -h 192.168.10.231 -f idr0054.sql
BEGIN
mkngff_fileset
----------------
5811532
(1 row)
COMMIT
Rendering fails - expected since we don't have latest ZarrReader...
2023-08-16 10:54:40,374 ERROR [ ome.io.nio.PixelsService] (.Server-10) Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023_converted/idr0054/zarr/Tonsil 1.ome.zarr/OME/METADATA.ome.xml
java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid index: -1
Update ZarrReader on idr0138-pilot:
wget https://merge-ci.openmicroscopy.org/jenkins/job/BIOFORMATS-build/default/507/artifact/bio-formats-build/ZarrReader/target/OMEZarrReader-0.3.2-SNAPSHOT-jar-with-dependencies.jar
mv OMEZarrReader-0.3.2-SNAPSHOT-jar-with-dependencies.jar OMEZarrReader.jar
$ rm /opt/omero/server/OMERO.server/lib/client/OMEZarrReader.jar
rm: cannot remove ‘/opt/omero/server/OMERO.server/lib/client/OMEZarrReader.jar’: No such file or directory
Hmm - seems that idr0138 doesn't have ZarrReader - can we just add it?
sudo cp OMEZarrReader.jar /opt/omero/server/OMERO.server/lib/client/
sudo cp OMEZarrReader.jar /opt/omero/server/OMERO.server/lib/server/
sudo service omero-server restart
Redirecting to /bin/systemctl restart omero-server.service
Try rendering again - now we get same error as on idr0125-pilot:
2023-08-16 11:00:20,702 ERROR [ ome.io.nio.PixelsService] (l.Server-8) Error instantiating pixel buffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023_converted/idr0054/zarr/Tonsil 1.ome.zarr/OME/METADATA.ome.xml
java.lang.RuntimeException: ome.conditions.SecurityViolation: file demo_2/Blitz-0-Ice.ThreadPool.Server-5/2019-03/15/15-27-40.023_converted/idr0054/zarr/Tonsil 1.ome.zarr/.zattrs does not have a unique readable fileset
at ome.io.bioformats.BfPixelBuffer.reader(BfPixelBuffer.java:79)
Testing execute sql
from one server on another with idr0033.
Sql generated on idr-testing, copied to idr0125-pilot, updated SECRET etc (also symlinks created).
$ psql -U omero -d idr -h $DBHOST -f 23119.sql
UPDATE 3456
BEGIN
mkngff_fileset
----------------
5287787
(1 row)
COMMIT
Checking image... http://localhost:1040/webclient/?show=image-3249534
(base) bash-4.2$ grep -A 2 "458_mkngff/9c1a5073" /opt/omero/server/OMERO.server/var/log/Blitz-0.log | grep -A 2 "saved memo"
2023-09-21 14:54:41,906 DEBUG [ loci.formats.Memoizer] (l.Server-5) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/2017-03/07/23-50-06.458_mkngff/9c1a5073-3ebd-4e04-894c-900022e554e1.zarr/OME/.METADATA.ome.xml.bfmemo (10558639 bytes)
2023-09-21 14:54:41,906 DEBUG [ loci.formats.Memoizer] (l.Server-5) start[1695303204087] time[4877818] tag[loci.formats.Memoizer.setId]
2023-09-21 14:54:41,906 INFO [ ome.io.nio.PixelsService] (l.Server-5) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/2017-03/07/23-50-06.458_mkngff/9c1a5073-3ebd-4e04-894c-900022e554e1.zarr/OME/METADATA.ome.xml Series: 9
4877818 ms is 81 minutes
Test whether we need to add Directory
rows to the NGFF Filesets.
On idr0125-pilot, using the sql
from idr-testing, remove rows with Directory
from sql...
$ sed -i '/Directory/d' 23120.sql
$ psql -U omero -d idr -h $DBHOST -f 23120.sql
UPDATE 3456
BEGIN
mkngff_fileset
----------------
5287789
(1 row)
COMMIT
http://localhost:1040/webclient/?show=well-1316985 ...
This is viewable with
File count: 21525 compared with File count: 39206 for the Filesets above (containing Directories).
(base) [wmoore@pilot-idr0125-omeroreadwrite ~]$ grep -A 2 "252_mkngff/7e7bc" /opt/omero/server/OMERO.server/var/log/Blitz-0.log | grep -A 2 "saved memo"
2023-09-21 17:40:22,272 DEBUG [ loci.formats.Memoizer] (.Server-10) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/2017-03/08/03-28-36.252_mkngff/7e7bc669-6cc3-460f-bac5-9f84f9237b0e.zarr/OME/.METADATA.ome.xml.bfmemo (10558531 bytes)
2023-09-21 17:40:22,272 DEBUG [ loci.formats.Memoizer] (.Server-10) start[1695312725659] time[5296612] tag[loci.formats.Memoizer.setId]
2023-09-21 17:40:22,273 INFO [ ome.io.nio.PixelsService] (.Server-10) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/2017-03/08/03-28-36.252_mkngff/7e7bc669-6cc3-460f-bac5-9f84f9237b0e.zarr/OME/METADATA.ome.xml Series: 117
--
2023-09-21 18:57:56,345 DEBUG [ loci.formats.Memoizer] (l.Server-3) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/2017-03/08/03-28-36.252_mkngff/7e7bc669-6cc3-460f-bac5-9f84f9237b0e.zarr/OME/.METADATA.ome.xml.bfmemo (10558487 bytes)
2023-09-21 18:57:56,345 DEBUG [ loci.formats.Memoizer] (l.Server-3) start[1695317413272] time[5263072] tag[loci.formats.Memoizer.setId]
2023-09-21 18:57:56,345 INFO [ ome.io.nio.PixelsService] (l.Server-3) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/2017-03/08/03-28-36.252_mkngff/7e7bc669-6cc3-460f-bac5-9f84f9237b0e.zarr/OME/METADATA.ome.xml Series: 117
5296612 ms is 88 minutes.
Testing https://github.com/yandex-cloud/geesefs as an alternative to goofys...
On idr0125-pilot...
$ wget https://github.com/yandex-cloud/geesefs/releases/latest/download/geesefs-linux-amd64
$ chmod +x geesefs-linux-amd64
$ sudo mv geesefs-linux-amd64 /opt/geesefs
# similar command and options as goofys...
$ sudo mkdir /bia-integrator-geesefs
$ sudo /opt/geesefs --endpoint https://uk1s3.embassy.ebi.ac.uk/ -o allow_other bia-integrator-data /bia-integrator-geesefs
s3.INFO anonymous bucket detected
main.INFO File system has been successfully mounted.
$ ls /bia-integrator-geesefs/S-BIAD861
0063750d-cd10-4759-8eca-c706a07b6693
...
Installed geesefs
on idr-testing:omeroreadwrite as above.
Try running mkngff
there using geesefs compared with using goofys.
As wmoore user...
screen -S mkngff
cd
mkdir idr0013_geese
wget https://raw.githubusercontent.com/IDR/idr-utils/cac35aa0d1731afb5db0ab6b60e10bdf03c591fd/scripts/ngff_filesets/idr0013.csv
for r in $(cat $IDRID.csv); do
biapath=$(echo $r | cut -d',' -f2)
uuid=$(echo $biapath | cut -d'/' -f2)
fsid=$(echo $r | cut -d',' -f3 | tr -d '[:space:]')
omero mkngff sql $fsid "/bia-integrator-geesefs/$biapath/$uuid.zarr" > "idr0013_geese/$fsid.sql"
done
mkngff
is still running on idr0013.csv
on idr-testing above...
Hasn't failed after 337 sql generated...
[wmoore@test120-omeroreadwrite ~]$ ls idr0013_geese/ | wc
337 337 3370
Since 1pm on 6th Oct approx 67 hours -> 12 minutes per sql
on average, although the timings are quite variable...
E.g. range of 27 minutes to 3 minutes in sample below...
[wmoore@test120-omeroreadwrite ~]$ for r in $(cat idr0013.csv); do fsid=$(echo $r | cut -d',' -f3 | tr -d '[:space:]'); ls -alh idr0013_geese/$fsid.sql; done
...
-rw-rw-r--. 1 wmoore wmoore 694K Oct 9 03:37 idr0013_geese/18781.sql
-rw-rw-r--. 1 wmoore wmoore 694K Oct 9 03:41 idr0013_geese/18572.sql
-rw-rw-r--. 1 wmoore wmoore 215K Oct 9 03:52 idr0013_geese/18942.sql
-rw-rw-r--. 1 wmoore wmoore 701K Oct 9 04:31 idr0013_geese/18475.sql
-rw-rw-r--. 1 wmoore wmoore 701K Oct 9 04:58 idr0013_geese/18509.sql
-rw-rw-r--. 1 wmoore wmoore 694K Oct 9 05:07 idr0013_geese/18785.sql
-rw-rw-r--. 1 wmoore wmoore 694K Oct 9 05:21 idr0013_geese/18583.sql
-rw-rw-r--. 1 wmoore wmoore 694K Oct 9 05:44 idr0013_geese/18680.sql
-rw-rw-r--. 1 wmoore wmoore 701K Oct 9 05:50 idr0013_geese/18378.sql
-rw-rw-r--. 1 wmoore wmoore 701K Oct 9 06:25 idr0013_geese/18357.sql
-rw-rw-r--. 1 wmoore wmoore 701K Oct 9 06:47 idr0013_geese/18536.sql
-rw-rw-r--. 1 wmoore wmoore 576K Oct 9 06:50 idr0013_geese/18832.sql
-rw-rw-r--. 1 wmoore wmoore 0 Oct 9 06:50 idr0013_geese/18653.sql
NB This workflow has been moved to https://github.com/IDR/mkngff_upgrade_scripts (main README)
Once a submission has been processed by BioStudies, it will become available at a URL like: https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/pages/S-BIAD815.html
We need to harvest the uuids from the links in the "Viewable Images" table. We can do this with the following JavaScript code, pasted into the
Console
tab of the browser dev tools:Which will print something like this:
That CSV is a table of
filesetName.ome.zarr, UUID
. We need to add the Fileset IDs from IDR to that table, usingidr-util
scripts from https://github.com/IDR/idr-utils/pull/56 That PR contains a fileidr_filesets.csv
which containsFileset ID, filesetName.ome.zarr
from IDR. It also contains a script to take the csv from above and add the appropriate Fileset IDs (fromidr_filesets.csv
).Checkout the
idr-utils
branch of that PR. This can be done on a local machine. Copy the csv generated by JavaScript above and save it into a file likeidr-utils/scripts/ngff_filesets/idr0051.csv
. You will see some examples included in that PR. Then run the script, passing in the IDR ID...This will update the csv file you just created, adding in the Fileset IDs to a new 3rd column.
Now we want to use that data with
omero-mkngff
. We need to do everything as theomero-server
user since we'll want to be able to create symlinks from the ManagedRep.E.g. working on
idr0138-pilot
...Created conda environment created as
omero-server
user, e.g.mkngff
and installed omero-py andomero-mkngff
Get Database password (and host) needed for psql, and set these to env variables. Also set variable for
$IDRID
so you can copy and paste other commands from below...Use psql to get SECRET (last session ID). NB: for pilot servers we only have 1 process (as in this example). For other servers, update the
1
to3
in this psql command:Copy the contents of
idr0051.csv
table from above (containsFileset ID
andUUID
) and create a copy of the csv in theomero-server
user's home dir...Now we can read that csv and create an sql file for each Fileset (named
FILESET_ID.sql
). In the loop below,biapath
is likeS-BIAD815/51afff7c-eed4-44b4-95c7-1437d8807b97
anduuid
is like51afff7c-eed4-44b4-95c7-1437d8807b97
.The BIA s3 repository should be mounted under
/bia-integrator-data
:Check that e.g.
$ ls /bia-integrator-data/S-BIAD815/51afff7c-eed4-44b4-95c7-1437d8807b97/51afff7c-eed4-44b4-95c7-1437d8807b97.zarr
will give you0 OME
Theomero mkngff
command below also creates the symlinks we need, from the ManagedRepository to the s3-mounted data (if they don't already exist).Running sql on a different server (using saved sql)
Zip and copy sql to a different server. Unzip and update the SECRET in all sql files, getting current
$SECRET
as above The replace didn't work using$SECRET
etc in the regex, so just use actual values...SECRETUUID
is the default placeholder if you didn't use--secret
option to create sql.We want to execute all sql, using the csv, and also to use
omero mkngff
to do just the symlink creation...Now we can try viewing the images in webclient. NB: sometimes this can take a while for the memo file to be regenerated. To check on the timings you can use unique string from the fileset name
E.g.
2519114
ms is 42 minutes.