Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idr0125 NGFF import #4

Open
will-moore opened this issue Sep 11, 2023 · 80 comments
Open

idr0125 NGFF import #4

will-moore opened this issue Sep 11, 2023 · 80 comments

Comments

@will-moore
Copy link
Member

On idr0125-pilot, going to test import of METADATA.ome.xml and then use mkngff to replace the fileset with full NGFF plate mounted on s3.

sudo cp idr0125/SQ00015207__2016-04-24T05_39_26-Measurement1.ome.zarr/OME/METADATA.ome.xml /opt/omero/server/
import as omero-server user...

omero import --transfer=ln_s --skip=all METADATA.ome.xml --file /tmp/idr0125_xml.log  --errs /tmp/idr0125_xml.err
$ tail -f /tmp/idr0125_xml.err
2023-09-04 16:00:07,716 15221      [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Name: Linux
2023-09-04 16:00:07,716 15221      [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Arch: amd64
2023-09-04 16:00:07,716 15221      [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Version: 3.10.0-1160.45.1.el7.x86_64
2023-09-04 16:00:07,994 15499      [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_PREPARATION
2023-09-04 16:00:31,170 38675      [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_START
2023-09-04 16:00:31,188 38693      [3-thread-1] INFO   s.importer.transfers.SymlinkFileTransfer - Transferring /opt/omero/server/idr0125/METADATA.ome.xml...
2023-09-04 16:00:31,412 38917      [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_STARTED: /opt/omero/server/idr0125/METADATA.ome.xml
2023-09-04 16:00:32,219 39724      [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /opt/omero/server/idr0125/METADATA.ome.xml
2023-09-04 16:00:32,391 39896      [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_END
2023-09-04 16:00:32,673 40178      [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_STARTED Logfile: 52201342

Other imported objects:
Fileset:5287519

==> Summary
1 file uploaded, 1 fileset, 1 plate created, 3447 images imported, 0 errors in 0:59:35.161

Running mkngff to replace OME.METADATA.ome.xml single-file Fileset with NGFF plate...

$ omero mkngff sql --symlink_repo /data/OMERO/ManagedRepository --secret=$SECRET 5287519 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015207__2016-04-24T05_39_26-Measurement1.ome.zarr > 5287519.sql

Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix demo_2/Blitz-0-Ice.ThreadPool.Server-141/2023-09/04 // 16-00-19.149 for fileset 5287519
Checking for prefix_dir /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-141/2023-09/04/16-00-19.149
Creating dir at /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-141/2023-09/04/16-00-19.149_mkngff
Creating symlink /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-141/2023-09/04/16-00-19.149_mkngff/SQ00015207__2016-04-24T05_39_26-Measurement1.ome.zarr -> /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015207__2016-04-24T05_39_26-Measurement1.ome.zarr


$ psql -U omero -d idr -h $DBHOST -f 5287519.sql 
UPDATE 3447
BEGIN
 mkngff_fileset 
----------------
        5287569
(1 row)

COMMIT
@will-moore will-moore moved this to create new Filesets in idr-next in NGFF conversion Sep 11, 2023
@will-moore will-moore changed the title Use mkngff for import workflow idr0125 NGFF import with mkngff Sep 11, 2023
@will-moore
Copy link
Member Author

Updated bulk import yaml to import METADATA.ome.xml for every plate...

I went run bulk import on idr0125-pilot...

omero import --bulk screenA/idr0125-screenA-bulk.yml --file /tmp/idr0125_20230918.log  --errs /tmp/idr0125_20230918.err

but found that this failed because every Plate.zarr directory is empty.

ls /uod/idr/filesets/idr0125-way-cellpainting/s3-20221212/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr/

Could this be due to the update of symlinks in ManagedRepo? Commands are at https://github.com/IDR/idr0125-way-cellpainting/blob/d883ec3a88178b3aaf207acbf9612ef0e5e3f840/scripts/symlinks.bash

E.g.

cd /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-83/2022-12/14/10-51-00.924
rm -rf SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
ln -s /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

But this shouldn't affect what's under /uod/idr/filesets/idr0125-way-cellpainting/s3-20221212/ ??

@will-moore
Copy link
Member Author

Instead, lets simply download and import the OME/METADATA.ome.xml files...

NB: this loop repeats for every - in each yaml row as well as the actual plate names!

for r in $(cat /uod/idr/metadata/idr0125-way-cellpainting/docs/_data/plates.yml); do
  cd
  cd idr0125
  echo $r
  mkdir -p $r
  cd $r
  wget https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/$r/OME/METADATA.ome.xml
done

@will-moore
Copy link
Member Author

Needed to rename each dir to remove .ome.zarr because trying to import e.g. SQ00015117__2016-04-13T18_12_45-Measurement1.ome.zarr/METADATA.ome.xml failed looking for .zgroup etc.

for i in $(ls ./); do
  mv $i ${i/.ome.zarr/}
done
for i in $(ls ./); do
  omero import --transfer=ln_s --skip=all --name=$i $i/METADATA.ome.xml --file /tmp/$i.log  --errs /tmp/$i.err
done

@will-moore
Copy link
Member Author

$ tail -f /tmp/SQ00014812__2016-05-23T20_44_31-Measurement1.err

2023-09-18 19:01:25,306 3563454    [l.Client-3] INFO   ormats.importer.cli.LoggingImportMonitor - OBJECTS_RETURNED Step: 5 of 5  Logfile: 52313944
2023-09-18 19:01:26,455 3564603    [l.Client-2] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /opt/omero/server/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1/METADATA.ome.xml
Other imported objects:
Fileset:5287672

==> Summary
1 file uploaded, 1 fileset, 1 plate created, 3456 images imported, 0 errors in 0:59:19.730

@will-moore
Copy link
Member Author

will-moore commented Sep 20, 2023

Seems like import got stopped at some point (maybe due to server restart)...
Last log files are:

-rw-r--r--.  1 omero-server omero-server 4.3K Sep 19 12:33 SQ00015050__2016-05-24T06_38_27-Measurement1.err
-rw-r--r--.  1 omero-server omero-server    0 Sep 19 11:54 SQ00015050__2016-05-24T06_38_27-Measurement1.log

Moved the imported dirs out of idr0125/ into idr00125_imported/

ls idr0125_imported/
SQ00014812__2016-05-23T20_44_31-Measurement1  SQ00014816__2016-05-23T14_07_55-Measurement1  SQ00014820__2016-05-25T21_16_25-Measurement1  SQ00015044__2016-05-20T05_34_55-Measurement1	SQ00015048__2016-05-25T22_53_31-Measurement1
SQ00014813__2016-05-23T19_03_28-Measurement1  SQ00014817__2016-05-23T12_08_18-Measurement1  SQ00015041__2016-05-25T19_39_25-Measurement1  SQ00015045__2016-05-20T03_57_42-Measurement1	SQ00015049__2016-05-24T08_17_26-Measurement1
SQ00014814__2016-05-23T17_24_56-Measurement1  SQ00014818__2016-05-23T10_30_25-Measurement1  SQ00015042__2016-05-25T18_02_08-Measurement1  SQ00015046__2016-05-20T02_20_03-Measurement1	SQ00015050__2016-05-24T06_38_27-Measurement1
SQ00014815__2016-05-23T15_46_08-Measurement1  SQ00014819__2016-05-23T08_51_51-Measurement1  SQ00015043__2016-05-25T16_25_21-Measurement1  SQ00015047__2016-05-20T00_41_45-Measurement1

and restarted import in for loop as above, from idr0125/

@will-moore
Copy link
Member Author

will-moore commented Sep 28, 2023

Moved SQ00015110__2016-05-05T04_50_06-Measurement1 and other Plates before it into idr0125_imported and restarted import from idr0125 as above...

for i in $(ls ./); do   omero import --transfer=ln_s --skip=all --name=$i $i/METADATA.ome.xml --file /tmp/$i.log  --errs /tmp/$i.err

@will-moore
Copy link
Member Author

will-moore commented Sep 28, 2023

For running mkngff on idr0125-pilot, we have data mounted at

$ ls /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/

Lets run mkngff on this Plate/Filesets... as regular wmoore user on idr0125-pilot...

Screenshot 2023-09-28 at 15 28 08

(venv3) (base) [wmoore@pilot-idr0125-omeroreadwrite ~]$ omero mkngff sql --secret=$SECRET 5287672 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr > idr0125_sql/5287672.sql
Using session for public@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix: demo_2/Blitz-0-Ice.ThreadPool.Server-4/2023-09/18/18-02-07.024 for fileset: 5287672
...
$ psql -U omero -d idr -h $DBHOST -f idr0125_sql/5287672.sql 
UPDATE 3456
BEGIN
 mkngff_fileset 
----------------
        5288197
(1 row)
COMMIT

as omero-server...

(venv3) (base) bash-4.2$ omero mkngff symlink /data/OMERO/ManagedRepository 5287672 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Checking for prefix_dir /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-4/2023-09/18/18-02-07.024
Creating dir at /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-4/2023-09/18/18-02-07.024_mkngff
Creating symlink /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-4/2023-09/18/18-02-07.024_mkngff/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr -> /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

Viewing... http://localhost:1040/webclient/?show=well-2339987

EDIT: after 3 days this image(s) are still not viewable. Probably just takes too long for ZarrReader to read a BIG plate with all the data being remote in USA.

@will-moore
Copy link
Member Author

All METADATA.ome.xml imported above.
Last batch - first plate SQ00015111__2016-05-05T03_10_03-Measurement1 created at 2023-09-28 15:02:03
Last plate imported (created) at 2023-10-02 10:23:45.

94 Plates imported in about 90 hours. 1 hour per plate!

@will-moore
Copy link
Member Author

will-moore commented Oct 9, 2023

Since running mkngff above, and attempting to view image at http://localhost:1040/webclient/?show=well-2339987 (which still isn't visible) we now have ZarrReader update on idr0125-pilot.

Try another plate... 2nd plate: SQ00014813__2016-05-23T19_03_28-Measurement1

Fileset ID: 5287673

As wmoore user on idr0125-pilot...

omero mkngff sql --secret=$SECRET 5287673 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr > idr0125_sql/5287673.sql
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Found prefix: demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-09/18/19-01-33.585 for fileset: 5287673
...
(venv3) (base) [wmoore@pilot-idr0125-omeroreadwrite ~]$ psql -U omero -d idr -h $DBHOST -f idr0125_sql/5287673.sql
UPDATE 3456
BEGIN
 mkngff_fileset 
----------------
        5288270
(1 row)

COMMIT

As omero-server user...

(venv3) (base) bash-4.2$ omero mkngff symlink /data/OMERO/ManagedRepository 5287673 "/cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr"
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Checking for prefix_dir /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-09/18/19-01-33.585
Creating dir at /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-09/18/19-01-33.585_mkngff
Creating symlink /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-09/18/19-01-33.585_mkngff/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr -> /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr

View image at http://localhost:1040/webclient/?show=image-14847759 ...

@will-moore
Copy link
Member Author

This image is also still not viewable. I think we have to conclude that this approach isn't going to work. There's probably just too many files to load remotely (from the US).

@will-moore
Copy link
Member Author

Since the size of a "metadata-only" plate appears to be moderate, we can look again at the workflow tested earlier:

  • download metadata-only copies of all plates
  • import without chunks
  • symlinks script to create symlinks (after rendering an image from each plate first)
(base) [wmoore@pilot-idr0125-omeroreadwrite idr0125]$ du -sh ./SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/
82M	./SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/

@will-moore will-moore changed the title idr0125 NGFF import with mkngff idr0125 NGFF import Oct 10, 2023
@will-moore
Copy link
Member Author

will-moore commented Oct 10, 2023

With idr0125_plates.csv:

SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr
SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr
SQ00014815__2016-05-23T15_46_08-Measurement1.ome.zarr
SQ00014816__2016-05-23T14_07_55-Measurement1.ome.zarr
SQ00014817__2016-05-23T12_08_18-Measurement1.ome.zarr
SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr
SQ00014819__2016-05-23T08_51_51-Measurement1.ome.zarr
SQ00014820__2016-05-25T21_16_25-Measurement1.ome.zarr
SQ00015041__2016-05-25T19_39_25-Measurement1.ome.zarr
SQ00015042__2016-05-25T18_02_08-Measurement1.ome.zarr
SQ00015043__2016-05-25T16_25_21-Measurement1.ome.zarr
SQ00015044__2016-05-20T05_34_55-Measurement1.ome.zarr
SQ00015045__2016-05-20T03_57_42-Measurement1.ome.zarr
SQ00015046__2016-05-20T02_20_03-Measurement1.ome.zarr
SQ00015047__2016-05-20T00_41_45-Measurement1.ome.zarr
SQ00015048__2016-05-25T22_53_31-Measurement1.ome.zarr
SQ00015049__2016-05-24T08_17_26-Measurement1.ome.zarr
SQ00015050__2016-05-24T06_38_27-Measurement1.ome.zarr
SQ00015051__2016-05-24T05_00_04-Measurement1.ome.zarr
SQ00015052__2016-05-24T03_21_49-Measurement1.ome.zarr
SQ00015053__2016-05-24T01_42_05-Measurement1.ome.zarr
SQ00015054__2016-05-24T00_02_16-Measurement1.ome.zarr
SQ00015055__2016-05-23T22_23_05-Measurement1.ome.zarr
SQ00015056__2016-05-20T16_27_19-Measurement1.ome.zarr
SQ00015057__2016-05-20T14_48_37-Measurement1.ome.zarr
SQ00015058__2016-05-20T08_50_58-Measurement1.ome.zarr
SQ00015059__2016-05-20T07_12_47-Measurement1.ome.zarr
SQ00015096__2016-06-08T17_05_23-Measurement1.ome.zarr
SQ00015097__2016-06-08T15_26_27-Measurement1.ome.zarr
SQ00015098__2016-06-08T18_43_42-Measurement1.ome.zarr
SQ00015099__2016-06-08T13_48_06-Measurement1.ome.zarr
SQ00015100__2016-05-16T22_01_19-Measurement1.ome.zarr
SQ00015101__2016-05-16T20_23_02-Measurement1.ome.zarr
SQ00015102__2016-05-16T18_45_00-Measurement1.ome.zarr
SQ00015103__2016-05-16T17_06_53-Measurement1.ome.zarr
SQ00015105__2016-05-06T00_10_33-Measurement1.ome.zarr
SQ00015106__2016-05-05T22_30_28-Measurement1.ome.zarr
SQ00015107__2016-05-05T09_50_51-Measurement1.ome.zarr
SQ00015108__2016-05-05T08_10_09-Measurement1.ome.zarr
SQ00015109__2016-05-05T06_29_59-Measurement1.ome.zarr
SQ00015110__2016-05-05T04_50_06-Measurement1.ome.zarr
SQ00015111__2016-05-05T03_10_03-Measurement1.ome.zarr
SQ00015112__2016-05-05T01_29_08-Measurement1.ome.zarr
SQ00015116__2016-04-13T16_31_49-Measurement1.ome.zarr
SQ00015117__2016-04-13T18_12_45-Measurement1.ome.zarr
SQ00015118__2016-04-13T19_52_28-Measurement1.ome.zarr
SQ00015119__2016-04-13T21_33_42-Measurement1.ome.zarr
SQ00015120__2016-04-13T23_14_32-Measurement1.ome.zarr
SQ00015121__2016-04-14T00_54_07-Measurement1.ome.zarr
SQ00015122__2016-04-14T02_33_42-Measurement1.ome.zarr
SQ00015123__2016-04-14T04_14_45-Measurement1.ome.zarr
SQ00015124__2016-04-14T07_35_09-Measurement1.ome.zarr
SQ00015125__2016-04-13T14_53_08-Measurement2.ome.zarr
SQ00015126__2016-03-25T14_15_31-Measurement1.ome.zarr
SQ00015127__2016-04-14T05_53_59-Measurement1.ome.zarr
SQ00015128__2016-04-14T21_08_47-Measurement1.ome.zarr
SQ00015129__2016-04-15T05_30_25-Measurement1.ome.zarr
SQ00015130__2016-04-01T13_10_04-Measurement1.ome.zarr
SQ00015131__2016-03-25T17_23_46-Measurement1.ome.zarr
SQ00015132__2016-04-24T07_20_38-Measurement1.ome.zarr
SQ00015133__2016-04-24T08_59_07-Measurement1.ome.zarr
SQ00015134__2016-06-12T00_30_52-Measurement1.ome.zarr
SQ00015135__2016-06-11T22_53_05-Measurement1.ome.zarr
SQ00015136__2016-06-11T21_14_31-Measurement1.ome.zarr
SQ00015137__2016-06-11T19_36_55-Measurement1.ome.zarr
SQ00015138__2016-06-11T17_59_08-Measurement1.ome.zarr
SQ00015139__2016-06-11T16_21_04-Measurement1.ome.zarr
SQ00015140__2016-06-11T14_43_11-Measurement1.ome.zarr
SQ00015141__2016-06-09T08_43_58-Measurement1.ome.zarr
SQ00015142__2016-05-19T23_03_33-Measurement1.ome.zarr
SQ00015143__2016-05-19T21_25_23-Measurement1.ome.zarr
SQ00015144__2016-05-19T19_47_38-Measurement1.ome.zarr
SQ00015145__2016-05-19T18_10_43-Measurement1.ome.zarr
SQ00015146__2016-05-19T10_37_52-Measurement1.ome.zarr
SQ00015147__2016-05-17T07_49_53-Measurement1.ome.zarr
SQ00015148__2016-05-17T01_17_02-Measurement1.ome.zarr
SQ00015149__2016-05-16T23_39_00-Measurement1.ome.zarr
SQ00015150__2016-06-09T06_45_35-Measurement1.ome.zarr
SQ00015151__2016-06-09T05_07_35-Measurement1.ome.zarr
SQ00015152__2016-06-09T03_29_42-Measurement1.ome.zarr
SQ00015153__2016-06-09T01_50_39-Measurement1.ome.zarr
SQ00015154__2016-04-14T16_07_53-Measurement1.ome.zarr
SQ00015155__2016-04-14T17_48_56-Measurement1.ome.zarr
SQ00015156__2016-04-14T19_29_39-Measurement1.ome.zarr
SQ00015157__2016-04-14T22_48_58-Measurement1.ome.zarr
SQ00015158__2016-04-15T00_30_51-Measurement1.ome.zarr
SQ00015159__2016-04-15T02_10_36-Measurement1.ome.zarr
SQ00015160__2016-04-15T03_50_42-Measurement1.ome.zarr
SQ00015162__2016-04-15T08_49_32-Measurement1.ome.zarr
SQ00015163__2016-04-20T21_00_28-Measurement1.ome.zarr
SQ00015164__2016-04-20T22_38_54-Measurement1.ome.zarr
SQ00015165__2016-04-21T00_16_52-Measurement1.ome.zarr
SQ00015166__2016-04-21T01_55_54-Measurement1.ome.zarr
SQ00015167__2016-04-21T03_34_00-Measurement1.ome.zarr
SQ00015168__2016-04-21T05_12_27-Measurement1.ome.zarr
SQ00015169__2016-04-21T06_50_28-Measurement1.ome.zarr
SQ00015170__2016-04-21T08_29_08-Measurement1.ome.zarr
SQ00015171__2016-04-21T16_22_35-Measurement1.ome.zarr
SQ00015172__2016-04-21T18_01_12-Measurement1.ome.zarr
SQ00015173__2016-04-15T07_09_23-Measurement1.ome.zarr
SQ00015194__2016-03-25T12_39_04-Measurement1.ome.zarr
SQ00015195__2016-04-24T21_41_05-Measurement2.ome.zarr
SQ00015196__2016-04-24T23_20_24-Measurement2.ome.zarr
SQ00015197__2016-04-24T13_30_35-Measurement1.ome.zarr
SQ00015198__2016-04-24T15_10_23-Measurement1.ome.zarr
SQ00015199__2016-04-23T15_43_06-Measurement1.ome.zarr
SQ00015200__2016-04-01T08_46_01-Measurement1.ome.zarr
SQ00015201__2016-04-25T02_38_35-Measurement2.ome.zarr
SQ00015202__2016-04-23T22_17_34-Measurement1.ome.zarr
SQ00015203__2016-04-25T00_59_49-Measurement2.ome.zarr
SQ00015204__2016-04-24T20_02_01-Measurement2.ome.zarr
SQ00015205__2016-04-24T02_21_50-Measurement1.ome.zarr
SQ00015206__2016-04-24T04_00_27-Measurement1.ome.zarr
SQ00015207__2016-04-24T05_39_26-Measurement1.ome.zarr
SQ00015208__2016-04-22T16_36_31-Measurement1.ome.zarr
SQ00015209__2016-04-22T18_16_23-Measurement1.ome.zarr
SQ00015210__2016-04-25T19_58_35-Measurement1.ome.zarr
SQ00015211__2016-04-23T17_22_06-Measurement1.ome.zarr
SQ00015212__2016-04-23T19_01_00-Measurement1.ome.zarr
SQ00015214__2016-05-04T23_48_48-Measurement1.ome.zarr
SQ00015215__2016-05-04T18_49_26-Measurement1.ome.zarr
SQ00015216__2016-05-04T17_08_56-Measurement1.ome.zarr
SQ00015217__2016-05-04T22_08_57-Measurement1.ome.zarr
SQ00015218__2016-05-04T08_36_42-Measurement1.ome.zarr
SQ00015219__2016-05-04T15_29_24-Measurement1.ome.zarr
SQ00015220__2016-05-04T20_29_20-Measurement1.ome.zarr
SQ00015221__2016-05-04T06_58_09-Measurement1.ome.zarr
SQ00015222__2016-05-06T05_09_24-Measurement1.ome.zarr
SQ00015223__2016-05-06T03_29_13-Measurement1.ome.zarr
SQ00015224__2016-05-06T01_49_03-Measurement1.ome.zarr
SQ00015229__2016-05-13T08_10_01-Measurement1.ome.zarr
SQ00015230__2016-05-12T18_00_11-Measurement1.ome.zarr
SQ00015231__2016-05-12T09_02_26-Measurement1.ome.zarr
SQ00015232__2016-05-12T07_24_32-Measurement1.ome.zarr
SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr
(base) [wmoore@pilot-idr0125-omeroreadwrite ngff]$ df -h /ngff
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       100G   87G   14G  87% /
cd /ngff
for zarr in $(cat idr0125_plates.csv);
  do aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" s3://cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/$zarr idr0125/$zarr;
done
...
11:21am...

...completed 18:54. 7 hrs 33 mins to download all metadata-only plates.

Used 9 GB of space, based on what's left:

(base) [wmoore@pilot-idr0125-omeroreadwrite ~]$ df -h /ngff
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1       100G   96G  4.8G  96% /

@will-moore
Copy link
Member Author

will-moore commented Oct 11, 2023

Started import the metadata-only plates downloaded to idr0125-pilot at /ngff/idr0125 using bulk.yml from 8973828

screen -r 17598.idr0125_import
...
(venv3) (base) bash-4.2$ omero import --depth=100 --bulk screenA/idr0125-screenA-bulk.yml --file /tmp/idr0125_20231011.log --errs /tmp/idr0125_20231011.err
...
2023-10-11 11:49:19,024 197526     [      main] ERROR                loci.formats.FormatHandler - ZarrReader populating Pixels metadata
2023-10-11 11:49:22,703 201205     [      main] ERROR                loci.formats.FormatHandler - ZarrReader parsing plate
2023-10-11 11:49:23,653 202155     [      main] ERROR                loci.formats.FormatHandler - ZarrReader initialization complete
2023-10-11 11:49:27,030 205532     [      main] ERROR                loci.formats.FormatHandler - ZarrReader fetching list of used files: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
2023-10-11 11:49:27,307 205809     [      main] ERROR                loci.formats.FormatHandler - ZarrReader returning list of used files of size: 11157
2023-10-11 11:49:28,816 207318     [      main] INFO      ome.formats.importer.ImportCandidates - 11157 file(s) parsed into 1 group(s) with 1 call(s) to setId in 171492ms. (197094ms total) [0 unknowns]
2023-10-11 11:49:29,672 208174     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064
2023-10-11 11:49:31,602 210104     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Insecure connection requested, falling back
2023-10-11 11:49:33,942 212444     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Pinging session every 300s.
2023-10-11 11:49:33,958 212460     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Server: 5.6.7
2023-10-11 11:49:33,958 212460     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Client: 5.6.2
2023-10-11 11:49:33,958 212460     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Java Version: 11.0.13
2023-10-11 11:49:33,959 212461     [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Name: Linux
2023-10-11 11:49:33,959 212461     [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Arch: amd64
2023-10-11 11:49:33,959 212461     [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Version: 3.10.0-1160.45.1.el7.x86_64
2023-10-11 11:49:34,669 213171     [      main] INFO          ome.formats.importer.ImportConfig - Using import target: Screen:name:idr0125-way-cellpainting/screenA
2023-10-11 11:49:34,887 213389     [2-thread-1] INFO         ome.formats.importer.ImportLibrary - Import target specifies container: Screen:3351
...

@will-moore
Copy link
Member Author

51 plates imported so far: ~ 10 per day.

@will-moore
Copy link
Member Author

Test import of first Plate on idr-testing with ZarrReader: /opt/omero/server/OMERO.server/lib/server/OMEZarrReader_p643_b565.jar from IDR/idr-metadata#675 (comment)

Using aws as wmoore in aws conda env...

$ aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" s3://cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

Moved data to /ngff/idr0125/ and chown to omero-server.
Import as omero-server...

$ omero import --depth=100 --transfer=ln_s --skip=all SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr --file /tmp/idr0125.log  --errs /tmp/idr0125.err
2023-10-17 10:57:54,260 291        [      main] INFO          ome.formats.importer.ImportConfig - OMERO.blitz Version: 5.7.1
2023-10-17 10:57:54,280 311        [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 7.0.0 revision: 3f8b3326cb578d59bd948fb84c838ff77e9f1b08 date: 1 August 2023
2023-10-17 10:57:54,344 375        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting checksum algorithm to File-Size-64
2023-10-17 10:57:54,345 376        [      main] INFO   formats.importer.cli.CommandLineImporter - Skipping thumbnails creation
2023-10-17 10:57:54,345 376        [      main] INFO   formats.importer.cli.CommandLineImporter - Skipping minimum/maximum computation
2023-10-17 10:57:54,345 376        [      main] INFO   formats.importer.cli.CommandLineImporter - Disabling upgrade check
2023-10-17 10:57:54,345 376        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting transfer to ln_s
2023-10-17 10:57:54,348 379        [      main] INFO   formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2023-10-17 10:57:54,716 747        [      main] INFO      ome.formats.importer.ImportCandidates - Depth: 100 Metadata Level: MINIMUM
2023-10-17 10:58:03,322 9353       [      main] ERROR                loci.formats.FormatHandler - ZarrReader getUsed files, skipPixels: true
2023-10-17 10:58:03,322 9353       [      main] ERROR                loci.formats.FormatHandler - ZarrReader fetching list of used files: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
2023-10-17 10:58:03,329 9360       [      main] ERROR                loci.formats.FormatHandler - Adding to the used files list: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/A/1/0/0/.zarray
2023-10-17 10:58:03,330 9361       [      main] ERROR                loci.formats.FormatHandler - Adding to the used files list: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/A/1/0/.zgroup
2023-10-17 10:58:03,330 9361       [      main] ERROR                loci.formats.FormatHandler - Adding to the used files list: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/A/1/0/.zattrs

...

2023-10-17 10:58:03,653 9684       [      main] ERROR                loci.formats.FormatHandler - Adding to the used files list: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/P/9/.zattrs
2023-10-17 10:58:03,653 9684       [      main] ERROR                loci.formats.FormatHandler - Adding to the used files list: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/P/.zgroup
2023-10-17 10:58:04,482 10513      [      main] INFO      ome.formats.importer.ImportCandidates - 11157 file(s) parsed into 0 group(s) with 1 call(s) to setId in 8723ms. (9766ms total) [0 unknowns]
2023-10-17 10:58:04,530 10561      [      main] INFO       ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064
2023-10-17 10:58:05,062 11093      [      main] INFO       ome.formats.OMEROMetadataStoreClient - Insecure connection requested, falling back
2023-10-17 10:58:05,450 11481      [      main] INFO       ome.formats.OMEROMetadataStoreClient - Pinging session every 300s.
2023-10-17 10:58:05,464 11495      [      main] INFO       ome.formats.OMEROMetadataStoreClient - Server: 5.6.9
2023-10-17 10:58:05,464 11495      [      main] INFO       ome.formats.OMEROMetadataStoreClient - Client: 5.7.1
2023-10-17 10:58:05,464 11495      [      main] INFO       ome.formats.OMEROMetadataStoreClient - Java Version: 11.0.20
2023-10-17 10:58:05,464 11495      [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Name: Linux
2023-10-17 10:58:05,464 11495      [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Arch: amd64
2023-10-17 10:58:05,464 11495      [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Version: 3.10.0-1160.99.1.el7.x86_64
No imports found

@will-moore
Copy link
Member Author

will-moore commented Oct 17, 2023

Also on idr0125-pilot, wanted to test whether import with chunks is working with current ZarrReader (which is likely 0.3.1 and Canonical paths PR)... EDIT - probably this is Performace PR before getUsedFiles - this works for import and for viewing mkngff Filesets after memo is generated - but doesn't work for generating memo file after mkngff.

Import idr0054 data directly from goofys mount of BIA bucket...

(venv3) (base) bash-4.2$ omero import -d 15301 --depth=100 /bia-integrator-data/S-BIAD800/a0e1b9c0-5c07-4600-b114-7b4697900e39/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr --file /tmp/idr0054.log  --errs /tmp/idr0054.err

Or from local copy...

omero import -d 15301 --depth=100 a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr --file /tmp/idr0054a.log  --errs /tmp/idr0054a.err
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/omero/server/OMERO.server-5.6.7-ice36/lib/client/OMEZarrReader.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/omero/server/OMERO.server-5.6.7-ice36/lib/client/logback-classic.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
2023-10-17 12:39:08,698 300        [      main] INFO          ome.formats.importer.ImportConfig - OMERO.blitz Version: 5.6.2
2023-10-17 12:39:08,717 319        [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 0.3.2-SNAPSHOT revision: e4b0b24f6f1cc9b98ea7edc03f218a631d79d0d2 date: 20230925-0010
2023-10-17 12:39:08,782 384        [      main] INFO   formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2023-10-17 12:39:09,251 853        [      main] INFO      ome.formats.importer.ImportCandidates - Depth: 100 Metadata Level: MINIMUM
2023-10-17 12:39:09,275 877        [      main] ERROR                loci.formats.FormatHandler - ZarrReader attempting to initialize file: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/OME/METADATA.ome.xml
2023-10-17 12:39:09,280 882        [      main] ERROR                loci.formats.FormatHandler - ZarrReader initializing ZarrService: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr
2023-10-17 12:39:09,286 888        [      main] ERROR                loci.formats.FormatHandler - ZarrReader parsing existing OME-XML
2023-10-17 12:39:09,679 1281       [      main] ERROR                loci.formats.FormatHandler - ZarrReader parsing top level group attributes: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr
2023-10-17 12:39:09,694 1296       [      main] ERROR                loci.formats.FormatHandler - ZarrReader generating group keys
2023-10-17 12:39:09,694 1296       [      main] ERROR                loci.formats.FormatHandler - ZarrReader adding group keys from ZarrService
2023-10-17 12:39:09,729 1331       [      main] ERROR                loci.formats.FormatHandler - ZarrReader parsing group Keys
2023-10-17 12:39:09,736 1338       [      main] ERROR                loci.formats.FormatHandler - ZarrReader attempting to generate Array Keys
2023-10-17 12:39:09,736 1338       [      main] ERROR                loci.formats.FormatHandler - ZarrReader adding Array Keys from ZarrService
2023-10-17 12:39:09,749 1351       [      main] ERROR                loci.formats.FormatHandler - ZarrReader ordering Array Paths
2023-10-17 12:39:09,749 1351       [      main] ERROR                loci.formats.FormatHandler - ZarrReader setting metadata for series : 0/0
2023-10-17 12:39:09,749 1351       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 0 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/0
2023-10-17 12:39:09,764 1366       [      main] ERROR                loci.formats.FormatHandler - ZarrReader opening Zarr to get Shape
2023-10-17 12:39:09,765 1367       [      main] ERROR                loci.formats.FormatHandler - ZarrReader setting metadata for series : 0/1
2023-10-17 12:39:09,765 1367       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 1 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/1
2023-10-17 12:39:09,766 1368       [      main] ERROR                loci.formats.FormatHandler - ZarrReader opening Zarr to get Shape
2023-10-17 12:39:09,766 1368       [      main] ERROR                loci.formats.FormatHandler - ZarrReader setting metadata for series : 0/2
2023-10-17 12:39:09,766 1368       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 0 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/0
2023-10-17 12:39:09,767 1369       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 2 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/2
2023-10-17 12:39:09,767 1369       [      main] ERROR                loci.formats.FormatHandler - ZarrReader opening Zarr to get Shape
2023-10-17 12:39:09,767 1369       [      main] ERROR                loci.formats.FormatHandler - ZarrReader setting metadata for series : 0/3
2023-10-17 12:39:09,768 1370       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 0 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/0
2023-10-17 12:39:09,768 1370       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 3 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/3
2023-10-17 12:39:09,769 1371       [      main] ERROR                loci.formats.FormatHandler - ZarrReader opening Zarr to get Shape
2023-10-17 12:39:09,769 1371       [      main] ERROR                loci.formats.FormatHandler - ZarrReader setting metadata for series : 0/4
2023-10-17 12:39:09,769 1371       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 0 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/0
2023-10-17 12:39:09,770 1372       [      main] ERROR                loci.formats.FormatHandler - Opening zarr for series 4 at path: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/4
2023-10-17 12:39:09,770 1372       [      main] ERROR                loci.formats.FormatHandler - ZarrReader opening Zarr to get Shape
2023-10-17 12:39:09,771 1373       [      main] ERROR                loci.formats.FormatHandler - ZarrReader populating Pixels metadata
2023-10-17 12:39:09,771 1373       [      main] ERROR                loci.formats.FormatHandler - ZarrReader parsing plate
2023-10-17 12:39:09,771 1373       [      main] ERROR                loci.formats.FormatHandler - ZarrReader initialization complete
2023-10-17 12:39:09,772 1374       [      main] ERROR                loci.formats.FormatHandler - ZarrReader fetching list of used files: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr
2023-10-17 12:39:09,790 1392       [      main] ERROR                loci.formats.FormatHandler - ZarrReader returning list of used files of size: 444
2023-10-17 12:39:09,835 1437       [      main] INFO      ome.formats.importer.ImportCandidates - 444 file(s) parsed into 1 group(s) with 1 call(s) to setId in 540ms. (584ms total) [0 unknowns]
2023-10-17 12:39:09,884 1486       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064
2023-10-17 12:39:10,415 2017       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Insecure connection requested, falling back
2023-10-17 12:39:10,744 2346       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Pinging session every 300s.
2023-10-17 12:39:10,756 2358       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Server: 5.6.7
2023-10-17 12:39:10,756 2358       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Client: 5.6.2
2023-10-17 12:39:10,756 2358       [      main] INFO       ome.formats.OMEROMetadataStoreClient - Java Version: 11.0.13
2023-10-17 12:39:10,756 2358       [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Name: Linux
2023-10-17 12:39:10,757 2359       [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Arch: amd64
2023-10-17 12:39:10,757 2359       [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Version: 3.10.0-1160.45.1.el7.x86_64
2023-10-17 12:39:11,315 2917       [      main] INFO          ome.formats.importer.ImportConfig - Using import target: Dataset:15301
2023-10-17 12:39:11,660 3262       [2-thread-1] INFO         ome.formats.importer.ImportLibrary - Import target specifies container: Dataset:15301
2023-10-17 12:39:11,670 3272       [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_PREPARATION
2023-10-17 12:39:34,326 25928      [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_START
2023-10-17 12:39:34,459 26061      [3-thread-1] INFO   ts.importer.transfers.UploadFileTransfer - Transferring /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/OME/METADATA.ome.xml...
2023-10-17 12:39:34,503 26105      [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_STARTED: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/OME/METADATA.ome.xml
2023-10-17 12:39:34,735 26337      [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/OME/METADATA.ome.xml

...

2023-10-17 12:42:18,693 190295     [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/0/4/0/9/0/0/0
2023-10-17 12:42:22,352 193954     [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_END
2023-10-17 12:42:22,477 194079     [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_STARTED Logfile: 53840675
2023-10-17 12:42:24,570 196172     [l.Client-1] INFO   ormats.importer.cli.LoggingImportMonitor - METADATA_IMPORTED Step: 1 of 5  Logfile: 53840675
2023-10-17 12:42:34,559 206161     [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - PIXELDATA_PROCESSED Step: 2 of 5  Logfile: 53840675
2023-10-17 12:42:36,168 207770     [l.Client-1] INFO   ormats.importer.cli.LoggingImportMonitor - THUMBNAILS_GENERATED Step: 3 of 5  Logfile: 53840675
2023-10-17 12:42:36,252 207854     [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - METADATA_PROCESSED Step: 4 of 5  Logfile: 53840675
2023-10-17 12:42:36,463 208065     [l.Client-1] INFO   ormats.importer.cli.LoggingImportMonitor - OBJECTS_RETURNED Step: 5 of 5  Logfile: 53840675
2023-10-17 12:42:37,860 209462     [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /ngff/idr0054/a0e1b9c0-5c07-4600-b114-7b4697900e39.zarr/OME/METADATA.ome.xml
Other imported objects:
Fileset:5288333

==> Summary
444 files uploaded, 1 fileset created, 1 image imported, 0 errors in 0:03:26.856

Screenshot 2023-10-17 at 13 44 53

@will-moore
Copy link
Member Author

will-moore commented Oct 18, 2023

Since import from #4 (comment) got interrupted (server restarts above), 61 plates were imported, so deleted 61 rows from idr0125-screenA-bulk.yml - then an extra row since that was SQ00015133__2016-04-24T08_59_07-Measurement1 which was the last plate imported.
Then restarted import...

(venv3) (base) bash-4.2$ omero import --depth=100 --bulk screenA/idr0125-screenA-bulk.yml --file /tmp/idr0125_20231018.log  --errs /tmp/idr0125_20231018.err

EDIT: oops - forgot to use --transfer=ln_s here!

@will-moore
Copy link
Member Author

Importing metadata-only plates is still in progress on idr0125-pilot.

Testing symlinking etc... with IDR/idr-utils#54

Moved some imported Plates into temp Screen:3352 to use for symlinking...
As omero-server user...

$ cd /uod/idr/metadata
$ python idr-utils/scripts/managed_repo_symlinks.py Screen:3352 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report

fileset_dirs {}

Fileset: 5288271 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-29/2023-10/11/11-57-46.608/
Render Image 15325028
fs_contents ['ngff']
Symlink target not found: /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/ngff

Fileset: 5288272 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2023-10/11/14-22-23.181/
Render Image 15331556
^C

A couple of issues:

  • Script seemed to hang when rendering the Image from 2nd plate.
  • Filesets have paths with ngff/idr0125/ after the prefix and before Plate name, e.g. demo_2/Blitz-0-Ice.ThreadPool.Server-29/2023-10/11/11-57-46.608/ngff/idr0125/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr/. Those extra paths aren't expected - we instead need to look inside them for the Plate which is to be replaced by a symlink.

@will-moore
Copy link
Member Author

The 2nd issue (bullet point) above seems to be due to the path in plates.tsv, e.g. /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
https://github.com/IDR/idr0125-way-cellpainting/blob/8973828b3959e2e35b38acdbeec32c886bd91957/screenA/idr0125-screenA-plates.tsv

However, the usual behaviour elsewhere is for the path/to/plate.zarr truncated to just give the plate.zarr, which is added to the Fileset prefix. managed_repo/fileset_prefix/plate.zarr. This is what was happening for the first import...

This is probably because I didn't use --transfer=ln_s for this import...

Stopped import (restarted the server and updated ZarrReader to use OMEZarrReader-0.3.1-jar-with-dependencies.jar).

77 plates imported now. Last one was SQ00015150__2016-06-09T06_45_35-Measurement1.
Updated sudo vi idr0125-screenA-plates.tsv to remove 17 lines upto and including that plate.

Restart...

omero import --depth=100 --transfer=ln_s --bulk screenA/idr0125-screenA-bulk.yml --file /tmp/idr0125_20231020.log  --errs /tmp/idr0125_20231020.err

@will-moore
Copy link
Member Author

For the first 77 plates imported, we need to use a TEMP commit of IDR/idr-utils@2888b21 to add in the /ngff/idr0125/ to the filesetPrefix...
With this installed....

python idr-utils/scripts/managed_repo_symlinks.py Screen:3352 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report
...

Fileset: 5288272 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2023-10/11/14-22-23.181/ngff/idr0125
Render Image 15331556
fs_contents ['SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2023-10/11/14-22-23.181/ngff/idr0125/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr

Fileset: 5288273 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-34/2023-10/11/16-38-30.825/ngff/idr0125
Render Image 15338049
fs_contents ['SQ00014815__2016-05-23T15_46_08-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-34/2023-10/11/16-38-30.825/ngff/idr0125/SQ00014815__2016-05-23T15_46_08-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014815__2016-05-23T15_46_08-Measurement1.ome.zarr

@will-moore
Copy link
Member Author

Something strange going on.....

ALL 3 of the images rendered above (one for the each fileset) are orphans!
E.g http://localhost:1040/iviewer/image_data/15325028/
They aren't found by /webclient/?show=image-15325028 because
http://localhost:1040/webclient/api/paths_to_object/?image=15325028 returns "orphaned".

"meta": {
"imageName": "SQ00014813__2016-05-23T19_03_28-Measurement1 [P/24/0/0]",
"imageDescription": "",
"imageAuthor": "Public data",
"projectName": "Multiple",
"projectId": null,
"projectDescription": "",
"datasetName": "Multiple",
"datasetId": null,
"datasetDescription": "",
"wellSampleId": "",
"wellId": "",
"imageTimestamp": 1464050222,
"imageId": 15325028,
"pixelsType": "uint16"
},

Images are found in that script with:

    params.addId(fileset_id)
    params.page(0, 1)
    query = "select img from Image img where img.fileset.id=:id"
    first_image = conn.getQueryService().findAllByQuery(query, params, conn.SERVICE_OPTS)[0]

@will-moore
Copy link
Member Author

It also appears that all plates imported above (without --transfer=ln_x give ResourceError when trying to view an Image from any field position except the first (index=0). This is true both before and after the symlink update.

@will-moore
Copy link
Member Author

Seems that with the first 2 batches imported above (without in-place import) each Fileset creates lots of extra images: 6528 instead of 3456.
6528 / 384 is 17 images per Well, which would be 2 for every field except the first. NB: Every field except the first gives ResourceError when trying to view.

(venv3) (base) bash-4.2$ grep -A 1 "Summary" /tmp/idr0125_20231011.err
...
==> Summary
11157 files uploaded, 1 fileset, 1 plate created, 6528 images imported, 0 errors in 2:10:24.594
--
==> Summary
11157 files uploaded, 1 fileset, 1 plate created, 6528 images imported, 0 errors in 2:12:56.714
--
==> Summary
11157 files uploaded, 0 filesets created, 0 images imported, 0 errors in 1:19:27.922

Will need to re-import all those 77 plates!

@will-moore
Copy link
Member Author

will-moore commented Oct 23, 2023

Checking last import logs /tmp/idr0125_20231020.err found a couple of Plates failed to import:

  • SQ00015151__2016-06-09T05_07_35-Measurement1.ome.zarr - not imported - clientpath match. Don't understand this - tried checking other plates previously imported with this name, but none have clientpath to match /ngff/idr0125/...
  • SQ00015160__2016-04-15T03_50_42-Measurement1.ome.zarr - Ice.OperationInterruptedException ... 2 errors in 1:07:09.34 - Don't know what's going on here?
  • SQ00015171__2016-04-21T16_22_35-Measurement1.ome.zarr - Ice.UnmarshalOutOfBoundsException ... 0 errors in 1:22:42.064 (this error caused import to pause)

Edited idr0125-screenA-plates.tsv to try again with those 3 Plates, then with all others after SQ00015171__2016-04-21T16_22_35-Measurement1.ome.zarr

screen -r idr0125_import and cancelled import.
Restarted import... (still using OMEZarrReader-0.3.1-jar-with-dependencies.jar)...

(venv3) (base) bash-4.2$ omero import --depth=100 --transfer=ln_s --bulk screenA/idr0125-screenA-bulk.yml --file /tmp/idr0125_20231023.log  --errs /tmp/idr0125_20231023.err

EDIT... 3 failed imports re-tried above ALL failed with ClientPath match - I guess the partial import still leaves Filesets.

@will-moore
Copy link
Member Author

will-moore commented Oct 23, 2023

$ python idr-utils/scripts/managed_repo_symlinks.py Screen:3351 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report

fileset_dirs {}

Fileset: 5288371 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-3/2023-10/20/13-55-33.718/
Render Image 15829653
fs_contents ['SQ00015152__2016-06-09T03_29_42-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-3/2023-10/20/13-55-33.718/SQ00015152__2016-06-09T03_29_42-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015152__2016-06-09T03_29_42-Measurement1.ome.zarr

Fileset: 5288372 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2023-10/20/16-23-21.825/
Render Image 15831760
...

EDIT - Kinda slow to render Images and create symlinks: Took 75 mins, to do 17 Plates

@will-moore
Copy link
Member Author

will-moore commented Nov 16, 2023

Import done.
Need to update symlinks for 11151-11219.
Since these were imported with ZarrReader.jar from performance PR, we have extra /data/ngff in path, which needs correct commit of managed_repo_symlinks PR:

$ sudo -Es git checkout 2888b21c2751421ecf24a
...
2888b21... TEMP add /ngff/idr0125 to templatePrefix for each fileset

As omero-server... 10:38...

for i in {11151..11219}; do
    echo "$i"
    python idr-utils/scripts/managed_repo_symlinks.py Plate:$i /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report
done

EDIT: 11:00... leave running..

Fileset: 5288583 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-39/2023-11/08/14-55-46.675/ngff/idr0125
Render Image 16296891
fs_contents ['SQ00015151__2016-06-09T05_07_35-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-39/2023-11/08/14-55-46.675/ngff/idr0125/SQ00015151__2016-06-09T05_07_35-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015151__2016-06-09T05_07_35-Measurement1.ome.zarr
11164
fileset_dirs {}

Fileset: 5288584 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-50/2023-11/08/17-29-10.806/ngff/idr0125
Render Image 16298674

Tried browsing webclient in preparation for thumbnailing... Got DatabaseBusyException in webclient.
symlinking got to...

    preview_image(conn, fileset_id, args)
  File "idr-utils/scripts/managed_repo_symlinks.py", line 62, in preview_image
    image.renderJpeg()
  File "/opt/omero/server/venv3/lib64/python3.6/site-packages/omero/gateway/__init__.py", line 7949, in wrapped
    except ctx.ignoreExceptions:
TypeError: catching classes that do not inherit from BaseException is not allowed
11177
fileset_dirs {}

Can't login - need $ sudo service omero-server restart...

12:41...

for i in {11176..11219}; do     echo "$i";     python idr-utils/scripts/managed_repo_symlinks.py Plate:$i /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report; done

...
11219
fileset_dirs {}
Fileset: 5288639 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2023-11/14/10-23-13.402/ngff/idr0125
Render Image 16491466
fs_contents ['SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2023-11/14/10-23-13.402/ngff/idr0125/SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015233__2016-05-12T05_47_03-Measurement1.ome.zarr

completed (last link created at) 13:53. 70 mins for 43 symlinks

@will-moore
Copy link
Member Author

will-moore commented Nov 16, 2023

Browsing webclient to check links before running render...

        at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:328)
        ... 57 common frames omitted
2023-11-16 16:13:48,736 INFO  [                 org.perf4j.TimingLogger] (.Server-38) start[1700151134730] time[94006] tag[omero.call.exception]
2023-11-16 16:13:48,737 WARN  [        ome.services.util.ServiceHandler] (.Server-38) CannotCreateTransactionException thrown.

org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is ome.conditions.DatabaseBus
yException: Cannot acquire connection

This is without running anything else just now...

Restart server again...

Browsing a different plate on webclient - again...

Ice.UnknownException: exception ::Ice::UnknownException
{
    unknown = ome.conditions.DatabaseBusyException: cannot create transaction
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:289)

@will-moore
Copy link
Member Author

After leaving the server for a few days...

for i in {11053..11058}; do echo "$i"; python idr-utils/scripts/managed_repo_symlinks.py Plate:$i /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report; done

Tried again viewing an Image from the 3rd Plate: Plate: 11053, SQ00014814__2016-05-23T17_24_56-Measurement1.
I don't have a record of creating symlinks for that Plate, but the symlink and chunks seem to be there:

(base) [wmoore@pilot-idr0125-omeroreadwrite ~]$ ls -alh /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-2/2023-10/30/16-51-43.415/
total 0
drwxrwsr-x. 2 omero-server omero-server  67 Oct 31 09:57 .
drwxrwsr-x. 4 omero-server omero-server  94 Oct 30 17:11 ..
lrwxrwxrwx. 1 omero-server omero-server 142 Oct 31 09:57 SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr -> /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr

$ ls -alh /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-2/2023-10/30/16-51-43.415/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr/A/1/0/0/0/0/0/0
total 4.3M
drwxr-xr-x. 2 root root 4.0K Dec  7  2022 .
drwxr-xr-x. 2 root root 4.0K Dec  7  2022 ..
-rw-r--r--. 1 root root 2.0M Dec  7  2022 0
-rw-r--r--. 1 root root 2.1M Dec  7  2022 1
-rw-r--r--. 1 root root 239K Dec  7  2022 2

However, images from the Plate are not viewable.
Tried browsing the next 3 plates

	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: bitronix.tm.internal.BitronixRuntimeException: XA pool of resource dfce81f1-9a82-4a7c-b00e-4452ee77a8ba still empty after 30s wait time
	at bitronix.tm.resource.common.XAPool.getInPool(XAPool.java:319)
	at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:181)
	at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:150)
	at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:328)
	... 25 common frames omitted
2023-11-20 12:41:30,742 ERROR [     o.s.blitz.fire.PermissionsVerifierI] (.Server-34) Exception thrown while checking password for:public
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is ome.conditions.DatabaseBusyException: Cannot acquire connection
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:289)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:461)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:277)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy85.doWork(Unknown Source)
	at ome.services.util.Executor$Impl.executeSql(Executor.java:549)
	at ome.services.blitz.fire.Ring.checkPassword(Ring.java:270)
	at ome.services.blitz.fire.PermissionsVerifierI.checkPermissions(PermissionsVerifierI.java:97)
	at Glacier2._PermissionsVerifierDisp.___checkPermissions(_PermissionsVerifierDisp.java:114)
	at Glacier2._PermissionsVerifierDisp.__dispatch(_PermissionsVerifierDisp.java:149)
	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)
Caused by: ome.conditions.DatabaseBusyException: Cannot acquire connection
	at ome.services.db.SelfCorrectingDataSource.callWithRetries(SelfCorrectingDataSource.java:113)
	at ome.services.db.SelfCorrectingDataSource.getConnection(SelfCorrectingDataSource.java:60)
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:246)
	... 20 common frames omitted
2023-11-20 12:41:31,872 INFO  [ ome.services.blitz.fire.SessionManagerI] (.Server-34) Found session locally: 416569f8-07bc-44df-afdd-bea2d004cfa1
2023-11-20 12:41:31,873 INFO  [ ome.services.blitz.fire.SessionManagerI] (.Server-34) Rejoining session ServiceFactoryI(session-ba637349-1805-4f29-a971-4e26340c25c1/416569f8-07bc-44df-afdd-bea2d004cfa1) (agent=OMERO.web)
2023-11-20 12:41:31,878 INFO  [                      omero.cmd.SessionI] (.Server-35) Added servant to adapter: 416569f8-07bc-44df-afdd-bea2d004cfa1/ba637349-1805-4f29-a971-4e26340c25c1omero.api.IConfig(omero.api._IConfigTie@a7b89013)

@will-moore
Copy link
Member Author

Also still seeing ZarrReader logs...

...
2023-11-20 12:54:19,871 ERROR [              loci.formats.FormatHandler] (l.Server-0) Adding to the used files list: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-2/2023-10/30/16-51-43.415/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr/A/15/2/0/.zarray
2023-11-20 12:54:19,871 ERROR [              loci.formats.FormatHandler] (l.Server-7) Adding to the used files list: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-2/2023-10/30/16-51-43.415/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr/A/15/2/0/.zarray
2023-11-20 12:54:19,871 ERROR [              loci.formats.FormatHandler] (l.Server-1) Adding to the used files list: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-2/2023-10/30/16-51-43.415/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr/A/15/2/0/.zarray
...

@will-moore
Copy link
Member Author

Returning to idr0125-pilot again (since updating the ZarrReader to test idr0015 NGFF data) it looks like all the idr0125 data imported above is not viewable, possibly due to memo file regeneration.

Since we now have ZarrReader-0.4.0 released now with the NGFF performance improvements, lets install that and start a fresh import of all data...

wget https://artifacts.openmicroscopy.org/artifactory/ome.releases/ome/OMEZarrReader/0.4.0/OMEZarrReader-0.4.0.jar
...update, retstart etc...

sudo -Es git checkout -- screenA/idr0125-screenA-plates.tsv

Renamed previous idr0125 Screen in webclient, so fresh one should get created... bulk.yml still commented out the clientpath check

omero import --depth=100 --transfer=ln_s --bulk screenA/idr0125-screenA-bulk.yml --file /tmp/idr0125_20231214.log  --errs /tmp/idr0125_20231214.err

@will-moore
Copy link
Member Author

will-moore commented Dec 19, 2023

Import failed...

2023-12-14 10:19:52,383 687        [      main] INFO          ome.formats.importer.ImportConfig - OMERO.blitz Version: 5.6.2
2023-12-14 10:19:52,425 729        [      main] INFO          ome.formats.importer.ImportConfig - Bioformats version: 6.12.0 revision: 9d2f3cc080ff771569ca08fb7b3fe3558b8396f2 date: 14 February 2023
2023-12-14 10:19:52,511 815        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting transfer to ln_s
2023-12-14 10:19:52,516 820        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting checksum algorithm to File-Size-64
2023-12-14 10:19:52,516 820        [      main] INFO   formats.importer.cli.CommandLineImporter - Skipping thumbnails creation
2023-12-14 10:19:52,516 820        [      main] INFO   formats.importer.cli.CommandLineImporter - Skipping minimum/maximum computation
2023-12-14 10:19:52,516 820        [      main] INFO   formats.importer.cli.CommandLineImporter - Disabling upgrade check
2023-12-14 10:19:52,516 820        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting transfer to ln_s
2023-12-14 10:19:52,517 821        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting output format: yaml
2023-12-14 10:19:52,517 821        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting parallel upload: 10
2023-12-14 10:19:52,517 821        [      main] INFO   formats.importer.cli.CommandLineImporter - Setting parallel fileset: 10
2023-12-14 10:19:52,517 821        [      main] INFO   formats.importer.cli.CommandLineImporter - Log levels -- Bio-Formats: ERROR OMERO.importer: INFO
2023-12-14 10:19:55,317 3621       [      main] INFO      ome.formats.importer.ImportCandidates - Depth: 100 Metadata Level: MINIMUM
2023-12-14 10:23:27,435 215739     [      main] INFO      ome.formats.importer.ImportCandidates - 11157 file(s) parsed into 1 group(s) with 1 call(s) to setId in 190658ms. (212117ms total) [0 unknowns]
2023-12-14 10:23:29,035 217339     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Attempting initial SSL connection to localhost:4064
2023-12-14 10:23:31,174 219478     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Insecure connection requested, falling back
2023-12-14 10:23:31,991 220295     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Pinging session every 300s.
2023-12-14 10:23:32,003 220307     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Server: 5.6.7
2023-12-14 10:23:32,004 220308     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Client: 5.6.2
2023-12-14 10:23:32,004 220308     [      main] INFO       ome.formats.OMEROMetadataStoreClient - Java Version: 11.0.13
2023-12-14 10:23:32,004 220308     [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Name: Linux
2023-12-14 10:23:32,004 220308     [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Arch: amd64
2023-12-14 10:23:32,004 220308     [      main] INFO       ome.formats.OMEROMetadataStoreClient - OS Version: 3.10.0-1160.45.1.el7.x86_64
2023-12-14 10:23:32,805 221109     [      main] INFO          ome.formats.importer.ImportConfig - Using import target: Screen:name:idr0125-way-cellpainting/screenA
2023-12-14 10:23:33,180 221484     [2-thread-1] INFO         ome.formats.importer.ImportLibrary - Import target specifies container: Screen:3501
2023-12-14 10:23:33,186 221490     [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_PREPARATION
2023-12-14 11:27:50,970 4079274    [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_START
2023-12-14 11:27:51,022 4079326    [3-thread-3] INFO   s.importer.transfers.SymlinkFileTransfer - Transferring /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/A/1/0/.zattrs...
2023-12-14 11:27:51,022 4079326    [3-thread-2] INFO   s.importer.transfers.SymlinkFileTransfer - Transferring /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/A/1/0/0/.zarray...
...
2023-12-14 11:36:56,558 4624862    [3-thread-9] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/P/9/8/.zattrs
2023-12-14 11:36:56,566 4624870    [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/P/9/.zgroup
2023-12-14 11:36:56,927 4625231    [3-thread-4] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /ngff/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/P/.zgroup
2023-12-14 11:46:15,888 5184192    [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_END
2023-12-14 11:46:16,286 5184590    [2-thread-1] ERROR        ome.formats.importer.ImportLibrary - Error on import
Ice.UnmarshalOutOfBoundsException: null
        at IceInternal.BasicStream.readSize(BasicStream.java:632)
        at IceInternal.BasicStream$EncapsDecoder11.readObject(BasicStream.java:3543)
        at IceInternal.BasicStream.readObject(BasicStream.java:2262)
...
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:829)
2023-12-14 11:46:16,287 5184591    [2-thread-1] INFO         ome.formats.importer.ImportLibrary - Continuing after error

==> Summary
11157 files uploaded, 0 filesets created, 0 images imported, 0 errors in 1:22:43.987

Looking at Blitz logs around then doesn't show much...

grep "2023-12-14 11:46:16" /opt/omero/server/OMERO.server/var/log/Blitz-0.log.* | less

/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,142 INFO  [                 org.perf4j.TimingLogger] (.Server-13) start[1702554376139] time[3] tag[omero.call.success.ome.services.blitz.impl.ServiceFactoryI$3.doWork]
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,142 INFO  [        ome.services.util.ServiceHandler] (.Server-13)  Rslt:       false
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,143 INFO  [                      omero.cmd.SessionI] (.Server-13) Added servant to adapter: f740349b-7e94-42fe-a99e-dbd75fb00332/1ea1baca-a804-4966-9880-be092746d1b4omero.api.MetadataStore(omero.api._Meta
dataStoreTie@eb02f950)
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,167 INFO  [                      omero.cmd.SessionI] (l.Server-4) Unregistered servant:f740349b-7e94-42fe-a99e-dbd75fb00332/IHandle1b464420-82e0-45d3-970b-0c4c344cc770(omero.cmd._HandleTie@30297944)
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,167 INFO  [ o.s.b.r.ManagedImportRequestI.@7d32954e] (l.Server-4) Closing...
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,167 INFO  [ o.s.b.r.ManagedImportRequestI.@7d32954e] (l.Server-4) Handle closed before finished! State=READY
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,167 INFO  [ o.s.b.r.ManagedImportRequestI.@7d32954e] (l.Server-4) Cancelling...
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,271 INFO  [ o.s.b.r.ManagedImportRequestI.@7d32954e] (l.Server-4) Cancelled
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,271 INFO  [ o.s.b.r.ManagedImportRequestI.@7d32954e] (l.Server-4) notify cancelled: null/omero.cmd.Status@4240ce1e
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,271 INFO  [ o.s.b.r.ManagedImportRequestI.@7d32954e] (l.Server-4) notify cancelled: null/omero.cmd.Status@4240ce1e
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,290 INFO  [    ome.formats.OMEROMetadataStoreClient] (2-thread-4) Pinging session every 300s.
/opt/omero/server/OMERO.server/var/log/Blitz-0.log.2:2023-12-14 11:46:16,306 INFO  [        ome.services.util.ServiceHandler] (l.Server-3)  Meth:       interface ome.api.StatefulServiceInterface.close

@will-moore
Copy link
Member Author

Dom saw the same error for idr0138 NGFF import at https://idr-redmine.openmicroscopy.org/issues/266#note-20
Solved by not importing in parallel.

@will-moore
Copy link
Member Author

will-moore commented Apr 30, 2024

4 months later...

We now have s3-support in ZarrReader, using a .zarr.bfoptions file as a sibling beside the .zarr directory (symlink) that contains the alt_store in addition to other flags that tell ZarrReader to optimise performance, e.g. making assumptions that all images are same dimensions etc.

omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://path/to/data.zarr`

Test import on pilot-idrngff which has recent ZarrReader AND Bio-Formats jars updated from daily build:

bash-5.1$ ls -alh /opt/omero/server/OMERO.server/lib/server/OMEZarrReader_b45.jar 
-rw-r--r--. 1 omero-server omero-server 26M Apr 22 12:06 /opt/omero/server/OMERO.server/lib/server/OMEZarrReader_b45.jar

bash-5.1$ ls -alh /opt/omero/server/OMERO.server/lib/server/ | grep SNAPSHOT
-rw-r--r--. 1 omero-server omero-server 143K Apr 25 15:57 formats-api-8.0.0-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 880K Apr 25 15:57 formats-bsd-8.0.0-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 1.5M Apr 25 15:57 formats-gpl-8.0.0-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server  14K Apr 25 15:57 metakit-5.3.8-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 7.8K Apr 25 15:57 mipav-stubs-6.0.3-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server  90K Apr 25 15:57 ome-codecs-1.0.4-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 139K Apr 25 15:57 ome-common-6.0.23-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 1.0M Apr 25 15:57 ome-jai-0.1.5-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server  90K Apr 25 15:57 ome-mdbtools-5.3.4-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 928K Apr 25 15:57 ome-poi-5.3.10-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 639K Apr 25 15:57 ome-xml-6.3.7-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 615K Apr 25 15:57 specification-6.3.7-SNAPSHOT.jar
-rw-r--r--. 1 omero-server omero-server 1.3M Apr 25 15:57 turbojpeg-8.0.0-SNAPSHOT.jar

Want to install aws..

$ sudo dnf install awscli
...
Installed:
  awscli-1.23.10-3.el9.noarch   groff-1.22.4-10.el9.x86_64             paper-2.3-6.el9.x86_64                perl-File-Copy-2.34-480.el9.noarch  perl-IPC-Run3-0.048-23.el9.noarch     perl-locale-1.09-480.el9.noarch   
  psutils-2.07-1.el9.noarch     python3-botocore-1.25.10-1.el9.noarch  python3-colorama-0.4.4-12.el9.noarch  python3-docutils-0.16-6.el9.noarch  python3-jmespath-0.9.4-11.el9.noarch  python3-pyasn1-0.4.8-6.el9.noarch 
  python3-rsa-4.9-2.el9.noarch  python3-s3transfer-0.5.2-2.el9.noarch 

Complete!

$ which aws
/usr/bin/aws

Download metadata-only plates as omero-server...

sudo -u omero-server -s
cd
mkdir idr0125 && cd idr0125
vi idr0125_plates.csv.    # added first 5 plates from list above

for zarr in $(cat idr0125_plates.csv);
  do aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" s3://cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/$zarr idr0125/$zarr;
done

Import...

omero login
export OMERODIR=/opt/omero/server/OMERO.server

for zarr in $(cat idr0125_plates.csv);
  do omero import --depth=100 --transfer=ln_s --skip=all idr0125/$zarr --file /tmp/idr0125_$zarr.log  --errs /tmp/idr0125_$zarr.err;
done

log... First plate...

...
2024-04-30 14:34:27,973 13708373   [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /opt/omero/server/idr0125/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/METADATA.ome.xml
Other imported objects:
Fileset:6320647

==> Summary
11157 files uploaded, 1 fileset, 1 plate created, 3456 images imported, 0 errors in 3:48:16.912

@will-moore
Copy link
Member Author

Let's try to create a new bfoptions file for each Fileset as at IDR/idr-metadata#684 (comment) with the appropriate data
For first Plate, with Fileset paths like: demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/I/21/5/0/.zarray

We want to generate .bfoptions like this for first Plate

omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

First Plate Fileset ID is 6320647. First Image is 15154987
Need to check which file is referred to in Pixels Table:

idr=> select path, name from Pixels where image=15154987;
                                                           path                                                           |       name       
--------------------------------------------------------------------------------------------------------------------------+------------------
 demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME | METADATA.ome.xml
(1 row)

As omero-server on pilot-idrngff

For ZarrReader, the bfoptions file is a sibling of the .zarr directory:

export bfoptionspath="/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr.bfoptions"
export fsid=6320647

echo "omezarr.list_pixels=false" > $bfoptionspath;
echo "omezarr.quick_read=true" >> $bfoptionspath;
echo "omezarr.alt_store=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr" >> $bfoptionspath;

psql -U omero -d idr -h $DBHOST -f addbfoptions.sql 
CREATE FUNCTION

psql -U omero -d idr -h $DBHOST -c "select add_origfile_to_fileset($fsid, 'SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr.bfoptions', '$SECRET')"
 add_origfile_to_fileset 
-------------------------
                61623686
(1 row)

rm -f /data/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo

Try to view image... 10:40...

@will-moore
Copy link
Member Author

Saving memo was very fast (300 ms!?):

(venv3) bash-5.1$ grep -B 3 "10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1" /opt/omero/server/OMERO.server/var/log/Blitz-0.log | grep -B 3 "saved memo"
2024-05-01 09:40:32,659 INFO  [                      omero.cmd.SessionI] (l.Server-5) Removed servant from adapter: be265e12-20c1-45fb-bcdf-8695e703ddf5omero.api.IScript
2024-05-01 09:40:37,416 DEBUG [                   loci.formats.Memoizer] (l.Server-7) saved to temp file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo6657480071468204245
2024-05-01 09:40:37,416 DEBUG [                   loci.formats.Memoizer] (l.Server-7) start[1714556437115] time[300] tag[loci.formats.Memoizer.saveMemo]
2024-05-01 09:40:37,416 DEBUG [                   loci.formats.Memoizer] (l.Server-7) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo (6406530 bytes)

Images are viewable! - approx 6 seconds to render a plane (we only have a single resolution level - added comment at broadinstitute/lincs-cell-painting#54 (comment))

Save To All resulted in many thumbnails being updated, but at ~6 seconds each this eventually timed-out, so we only have thumbnails for part of the plate:

Screenshot 2024-05-01 at 12 14 48

@will-moore
Copy link
Member Author

To run the above bfoptions generation for "all" plates...

Need to generate csv with:

  • fileset ID: 6320647
  • templateprefix: demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/
  • zarr name: SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

Used https://github.com/IDR/idr0125-way-cellpainting/blob/0a59dab08898e0deb4e75d5b6a80f36e94ac9315/scripts/get_filesets_to_csv.py to generate

idr0125_filesets.csv

6320647,SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr,demo_2/Blitz-0-Ice.ThreadPool.Server-9/2024-04/30/10-46-12.114/
6320648,SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr,demo_2/Blitz-0-Ice.ThreadPool.Server-3/2024-04/30/14-34-41.406/
6320649,SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr,demo_2/Blitz-0-Ice.ThreadPool.Server-11/2024-04/30/18-29-40.187/
6320650,SQ00014815__2016-05-23T15_46_08-Measurement1.ome.zarr,demo_2/Blitz-0-Ice.ThreadPool.Server-8/2024-04/30/22-34-25.404/
6320651,SQ00014816__2016-05-23T14_07_55-Measurement1.ome.zarr,demo_2/Blitz-0-Ice.ThreadPool.Server-0/2024-05/01/02-28-45.532/
psql -U omero -d idr -h $DBHOST -f addbfoptions.sql 
CREATE FUNCTION

export s3url="https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr"

for r in $(cat idr0125_filesets.csv); do
  fsid=$(echo $r | cut -d',' -f1)
  zarrname=$(echo $r | cut -d',' -f2)
  prefix=$(echo $r | cut -d',' -f3 | sed 's/.$//')
  bfoptionspath="/data/OMERO/ManagedRepository/$prefix/$zarrname.bfoptions"
  echo $bfoptionspath
  echo "omezarr.list_pixels=false" > $bfoptionspath
  echo "omezarr.quick_read=true" >> $bfoptionspath
  echo "omezarr.alt_store=$s3url/$zarrname" >> $bfoptionspath
  psql -U omero -d idr -h $DBHOST -c "select add_origfile_to_fileset($fsid, '$zarrname.bfoptions', '$SECRET')"
  rm /data/BioFormatsCache/data/OMERO/ManagedRepository/$prefix/$zarrname/OME/.METADATA.ome.xml.bfmemo
done

/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-3/2024-04/30/14-34-41.406/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr.bfoptions
 add_origfile_to_fileset 
-------------------------
                61623688
(1 row)

/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-11/2024-04/30/18-29-40.187/SQ00014814__2016-05-23T17_24_56-Measurement1.ome.zarr.bfoptions
 add_origfile_to_fileset 
-------------------------
                61623689
(1 row)

/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-8/2024-04/30/22-34-25.404/SQ00014815__2016-05-23T15_46_08-Measurement1.ome.zarr.bfoptions
 add_origfile_to_fileset 
-------------------------
                61623690
(1 row)

/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-0/2024-05/01/02-28-45.532/SQ00014816__2016-05-23T14_07_55-Measurement1.ome.zarr.bfoptions
 add_origfile_to_fileset 
-------------------------
                61623691
(1 row)

Plate images are viewable 👍

@will-moore
Copy link
Member Author

will-moore commented May 1, 2024

Copy rendering settings from image viewed above (settings applied in webclient) to the 5 plates imported to date...

Run in a screen...

for i in {10551..10555}; do
    echo "$i"
    omero --debug=2 render copy Image:15154987 Plate:$i > /tmp/idr0125_copyplate_$i.log 2>/tmp/idr0125_copyplate_$i.err
done
(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ tail -f /tmp/idr0125_copyplate_10551.err   
Using session for demo@localhost:4064. Idle timeout: 10 min. Current group: Public
Image:15154988 got thumbnail in 8.03s
Image:15154989 got thumbnail in 54.77s
Image:15154990 got thumbnail in 62.49s
Image:15154991 got thumbnail in 34.76s
Image:15154992 got thumbnail in 49.56s
...

@will-moore
Copy link
Member Author

Rendering of thumbnails took ~16 hours for the first plate - approx 16 secs per image on average.

@will-moore
Copy link
Member Author

will-moore commented May 7, 2024

First plate took ~16 hours, 2nd plate took 24 hours, then last 3 plates took about 12 hours each.
This is comparable to above (before s3 support in ZarrReader) e.g. 13 hours at #4 (comment) and after.

(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ ls -alh /tmp/idr0125_copyplate_*
-rw-r--r--. 1 omero-server omero-server 130K May  2 05:57 /tmp/idr0125_copyplate_10551.err
-rw-r--r--. 1 omero-server omero-server 2.9K May  2 05:57 /tmp/idr0125_copyplate_10551.log
-rw-r--r--. 1 omero-server omero-server 131K May  3 06:12 /tmp/idr0125_copyplate_10552.err
-rw-r--r--. 1 omero-server omero-server 2.9K May  3 06:12 /tmp/idr0125_copyplate_10552.log
-rw-r--r--. 1 omero-server omero-server 130K May  3 18:06 /tmp/idr0125_copyplate_10553.err
-rw-r--r--. 1 omero-server omero-server 2.9K May  3 18:06 /tmp/idr0125_copyplate_10553.log
-rw-r--r--. 1 omero-server omero-server 130K May  4 07:27 /tmp/idr0125_copyplate_10554.err
-rw-r--r--. 1 omero-server omero-server 2.9K May  4 07:27 /tmp/idr0125_copyplate_10554.log
-rw-r--r--. 1 omero-server omero-server 129K May  4 16:27 /tmp/idr0125_copyplate_10555.err
-rw-r--r--. 1 omero-server omero-server 2.9K May  4 16:27 /tmp/idr0125_copyplate_10555.log

Checking the .log files, I see that all 3456 thumbnails are generated for all plates except first plate (1 less since the original image is there) and for the 2nd plate:

(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ cat /tmp/idr0125_copyplate_10552.log
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 98 images.
Rendering settings successfully copied                               to 93 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 100 images.
Rendering settings successfully copied                               to 56 images.

This is missing 2 + 7 images: Browsing the data I can see missing thumbnails for Wells:

  • 1O: last 2 fields
  • 1P: last 7 fields

These Images all have Channels named e.g. 0, 1, 2, 3, 4 in webclient, imgData JSON has "label": "0",.
This would explain why the copy of rendering settings failed above.
However, the original NGFF data has:
"label": "Channel 0"
E.g. https://ome.github.io/ome-ngff-validator/?source=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr/O/1/7/

The images appear to have "black" 0-array chunks (rather than missing chunks) of 9.2 kb each:

Screenshot 2024-05-07 at 11 53 45

We can manually fix this small number of images by copy, paste & save of rendering settings in webclient.

@will-moore
Copy link
Member Author

will-moore commented May 17, 2024

Sample plate at https://ome.github.io/ome-ngff-validator/?source=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr_withdownscale8/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/ has downsampled resolutions...

Need to download and re-import metadata only plate etc...

aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" s3://cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr_withdownscale8/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

omero import --depth=100 --transfer=ln_s --skip=all SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr --file /tmp/idr0125_withdownscale.log --errs /tmp/idr0125_withdownscale.err

...
2024-05-17 16:44:19,239 17201442   [l.Client-5] INFO   ormats.importer.cli.LoggingImportMonitor - OBJECTS_RETURNED Step: 5 of 5  Logfile: 61634458
2024-05-17 16:44:21,393 17203596   [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /opt/omero/server/idr0125/withdownscale/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/METADATA.ome.xml
Other imported objects:
Fileset:6320652

==> Summary
14613 files uploaded, 1 fileset, 1 plate created, 3456 images imported, 0 errors in 4:46:17.439

@will-moore
Copy link
Member Author

will-moore commented May 19, 2024

Create bfoptions...

vi /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-05/17/11-58-05.161/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr.bfoptions

omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr_withdownscale8/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr
psql -U omero -d idr -h $DBHOST -c "select add_origfile_to_fileset($fsid, 'SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr.bfoptions', '$SECRET')"
rm /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository//demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-05/17/11-58-05.161/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo
omero --debug=2 render copy Image:15172267 Plate:10556 > /tmp/idr0125_copyplate_20240519.log 2>/tmp/idr0125_copyplate_20240519.err

Looks faster!

Image:15172272 got thumbnail in 2.05s
Image:15172273 got thumbnail in 1.66s
Image:15172274 got thumbnail in 1.61s
Image:15172275 got thumbnail in 1.53s
Image:15172276 got thumbnail in 1.54s
Image:15172277 got thumbnail in 1.63s
Image:15172278 got thumbnail in 1.42s
...

EDIT: Done after approx 1.5 hours.

@will-moore
Copy link
Member Author

will-moore commented Jun 4, 2024

After OME meeting - now we have pyramids for all plates

On pilot-idrngff, setup goofys mount of cellpainting-gallery so we can symlink to it after import. We won't have any other local or mounted copy of the data, so this will be essential for memo file generation (ZarrReader can use the public s3 link in bfoptions for subsequent pixel access, but this is seems not sufficient for future memo file generation).

(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ sudo mkdir /cellpainting-gallery
(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ sudo goofys -o allow_other cellpainting-gallery /cellpainting-gallery/

Import ALL metadata-only plates as above

Create idr0125_plates.csv from above #4 (comment)

bash-5.1$ pwd
/opt/omero/server/idr0125
bash-5.1$ wc idr0125_plates.csv 
 136  136 7344 idr0125_plates.csv

In a screen...

for zarr in $(cat idr0125_plates.csv);
  do aws s3 sync --no-sign-request --exclude '*' --include "*.z*" --include "*.xml" s3://cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/$zarr idr0125/$zarr;
done

~6 hours later:

for zarr in $(cat idr0125_plates.csv);
  do omero import --depth=100 --transfer=ln_s --skip=all idr0125/$zarr --file /tmp/idr0125_$zarr.log  --errs /tmp/idr0125_$zarr.err;
done

@will-moore
Copy link
Member Author

First import log

...
2024-06-05 01:30:06,683 15009142   [3-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILE_UPLOAD_COMPLETE: /opt/omero/server/idr0125/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/P/9/.zgroup
2024-06-05 01:45:27,401 15929860   [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - FILESET_UPLOAD_END
2024-06-05 01:45:29,347 15931806   [2-thread-1] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_STARTED Logfile: 61659846
2024-06-05 02:22:04,606 18127065   [l.Client-0] INFO   ormats.importer.cli.LoggingImportMonitor - METADATA_IMPORTED Step: 1 of 5  Logfile: 61659846
2024-06-05 02:41:29,988 19292447   [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - PIXELDATA_PROCESSED Step: 2 of 5  Logfile: 61659846
2024-06-05 02:41:30,049 19292508   [l.Client-5] INFO   ormats.importer.cli.LoggingImportMonitor - THUMBNAILS_GENERATED Step: 3 of 5  Logfile: 61659846
2024-06-05 02:41:30,085 19292544   [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - METADATA_PROCESSED Step: 4 of 5  Logfile: 61659846
2024-06-05 02:41:30,114 19292573   [l.Client-5] INFO   ormats.importer.cli.LoggingImportMonitor - OBJECTS_RETURNED Step: 5 of 5  Logfile: 61659846
2024-06-05 02:41:36,564 19299023   [l.Client-4] INFO   ormats.importer.cli.LoggingImportMonitor - IMPORT_DONE Imported file: /opt/omero/server/idr0125/idr0125/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/METADATA.ome.xml
Other imported objects:
Fileset:6320653

==> Summary
14613 files uploaded, 1 fileset, 1 plate created, 3456 images imported, 0 errors in 5:11:36.992

Takes approx 5 hours instead of under 4 hours, probably due to extra resolution level

@will-moore
Copy link
Member Author

will-moore commented Jun 6, 2024

For first 5 Plates, put these into a Screen:3502 so we can update symlinks...
Using branch IDR/idr-utils#54

cd /uod/idr/metadata/idr-utils/
$ sudo -Es git fetch will
$ sudo -Es git checkout will/managed_repo_symlinks

As omero-server

screen -S idr0125_symlinks
source ~/venv3/bin/activate
cd /data/idr-metadata/idr-utils

omero login

# check mount - should list plates
ls /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr

$ python scripts/managed_repo_symlinks.py Screen:3502 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report

Took less than 10 mins for 5 plates.
Images are now viewable with chunks.

Rendering times (without bfoptions s3) in Preview panel is about 0.5 secs or less for low-resolution image plane (3 channels) and 2-3 seconds for full-resolution tiles.

Try setting rendering settings and thumbnails without bfoptions, for first 5 plates imported above...
16:49...

for i in {10557..10561}; do
    echo "$i"
    omero --debug=2 render copy Image:15175723 Plate:$i > /tmp/idr0125_copyplate_$i.log 2>/tmp/idr0125_copyplate_$i.err
done

Logs show 2-3 secs per Thumbnail...

Image:15175724 got thumbnail in 3.75s
Image:15175725 got thumbnail in 3.11s
Image:15175726 got thumbnail in 3.65s
Image:15175727 got thumbnail in 3.11s
Image:15175728 got thumbnail in 3.25s
Image:15175729 got thumbnail in 3.21s
Image:15175730 got thumbnail in 2.60s
Image:15175731 got thumbnail in 2.87s
Image:15175732 got thumbnail in 2.86s
Image:15175733 got thumbnail in 0.31s
Image:15175734 got thumbnail in 2.73s
Image:15175735 got thumbnail in 3.48s
Image:15175736 got thumbnail in 3.20s
Image:15175737 got thumbnail in 3.39s
Image:15175738 got thumbnail in 2.99s
Image:15175739 got thumbnail in 2.88s

...and 3 hours per plate:

(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ ls -alh /tmp | grep copyplate
-rw-r--r--.  1 omero-server omero-server 129K Jun  6 18:46 idr0125_copyplate_10557.err
-rw-r--r--.  1 omero-server omero-server 2.9K Jun  6 18:46 idr0125_copyplate_10557.log
-rw-r--r--.  1 omero-server omero-server 129K Jun  6 21:46 idr0125_copyplate_10558.err
-rw-r--r--.  1 omero-server omero-server 2.9K Jun  6 21:46 idr0125_copyplate_10558.log
-rw-r--r--.  1 omero-server omero-server 129K Jun  7 00:44 idr0125_copyplate_10559.err
-rw-r--r--.  1 omero-server omero-server 2.9K Jun  7 00:44 idr0125_copyplate_10559.log
-rw-r--r--.  1 omero-server omero-server 129K Jun  7 03:49 idr0125_copyplate_10560.err
-rw-r--r--.  1 omero-server omero-server 2.9K Jun  7 03:49 idr0125_copyplate_10560.log
-rw-r--r--.  1 omero-server omero-server 129K Jun  7 06:53 idr0125_copyplate_10561.err
-rw-r--r--.  1 omero-server omero-server 2.9K Jun  7 06:53 idr0125_copyplate_10561.log

@will-moore
Copy link
Member Author

will-moore commented Jun 25, 2024

Import still running from 3 weeks ago #4 (comment)

Now we have 90 newly-imported Plates (in addition to the 5 above).
Put them in a Screen in webclient and update symlinks as in previous comment:

python scripts/managed_repo_symlinks.py Screen:3503 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report
...
Fileset: 6320745 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-44/2024-06/24/23-22-39.294/
Render Image 15493675
fs_contents ['SQ00015165__2016-04-21T00_16_52-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-44/2024-06/24/23-22-39.294/SQ00015165__2016-04-21T00_16_52-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015165__2016-04-21T00_16_52-Measurement1.ome.zarr

Fileset: 6320746 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-41/2024-06/25/04-21-54.420/
Render Image 15497131
fs_contents ['SQ00015166__2016-04-21T01_55_54-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-41/2024-06/25/04-21-54.420/SQ00015166__2016-04-21T01_55_54-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015166__2016-04-21T01_55_54-Measurement1.ome.zarr

Fileset: 6320747 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-40/2024-06/25/09-28-38.106/
Render Image 15500587
fs_contents ['SQ00015167__2016-04-21T03_34_00-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-40/2024-06/25/09-28-38.106/SQ00015167__2016-04-21T03_34_00-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015167__2016-04-21T03_34_00-Measurement1.ome.zarr

@will-moore
Copy link
Member Author

will-moore commented Jun 26, 2024

Previously we don't need to add the bfoptions to the Fileset (as we did for idr0009 and tested above) since ZarrReader will check for the .bfoptions file regardless (as it does for all other NGFF data)!

Test on one Plate...
First of the 5 imported above: http://localhost:1080/webclient/?show=plate-10557

demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/04/21-30-02.916/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

Need to create .bfoptions at

/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/04/21-30-02.916/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr.bfoptions
omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr_withdownscale8/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr

Delete memo...

rm -f /data/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/04/21-30-02.916/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo

Taking a while to regenerate (viewing in webclient)...

Eventually done - logs claim 414 milli-secs - although this completed at 17:06BST (16:06 GMT) and was started some time ago!

grep -B 3 "21-30-02.916/SQ00014812__2016-05-23T20_44_31-Measurement1" /opt/omero/server/OMERO.server/var/log/Blitz-0.log | grep -B 3 "saved memo"
2024-06-26 16:06:45,194 INFO  [                      omero.cmd.SessionI] (.Server-43) Removed servant from adapter: eaaf2e19-0308-470a-a645-13705799f767omero.api.IQuery
2024-06-26 16:06:48,659 DEBUG [                   loci.formats.Memoizer] (.Server-37) saved to temp file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/04/21-30-02.916/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo6092143311287441869
2024-06-26 16:06:48,659 DEBUG [                   loci.formats.Memoizer] (.Server-37) start[1719418008245] time[414] tag[loci.formats.Memoizer.saveMemo]
2024-06-26 16:06:48,659 DEBUG [                   loci.formats.Memoizer] (.Server-37) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/04/21-30-02.916/SQ00014812__2016-05-23T20_44_31-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo (6996260 bytes)

Previously, when bfoptions file was added to the Fileset, memo file regeneration was very fast (300 ms)! #4 (comment)
So let's try that with another Plate - 2nd of the bunch of 5... http://localhost:1080/webclient/?show=plate-10558

demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/05/02-49-36.819/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr

Create bfoptions at

/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/05/02-49-36.819/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr.bfoptions

with

omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://cellpainting-gallery.s3.amazonaws.com/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr
$ psql -U omero -d idr -h $DBHOST -c "select add_origfile_to_fileset(6320654, 'SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr.bfoptions', '$SECRET')"
 add_origfile_to_fileset 
-------------------------
                64161893
(1 row)

Delete memo...

rm /data/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/05/02-49-36.819/SQ00014813__2016-05-23T19_03_28-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo

View in webclient.... again, memo file generation is not quick....

@will-moore
Copy link
Member Author

Copy rendering settings from first Image to the rest of first Plate...

omero --debug=2 render copy Image:15175723 Plate:10557 > /tmp/idr0125_copyplate_10557.log 2>/tmp/idr0125_PR59_copyplate_10557.err

@will-moore
Copy link
Member Author

Seems that not all 90 plates in Screen above have had symlinks created correctly at #4 (comment)
The 3 Plates listed there are OK (can see chunks loading in webclient) but others not working.

Try re-running:

$ ssh -A pilot-idrngff -L 1080:localhost:80
$ sudo -u omero-server -s
$ screen -r idr0125_symlinks
$ source /opt/omero/server/venv3/bin/activate

$ cd /uod/idr/metadata/idr-utils/

$ python scripts/managed_repo_symlinks.py Screen:3503 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report
fileset_dirs {}

Fileset: 6320658 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2024-06/05/22-56-44.206/
Render Image 15193003
fs_contents ['SQ00014817__2016-05-23T12_08_18-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-28/2024-06/05/22-56-44.206/SQ00014817__2016-05-23T12_08_18-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014817__2016-05-23T12_08_18-Measurement1.ome.zarr

Fileset: 6320659 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/
Render Image 15196459
fs_contents ['SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr

Fileset: 6320660 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/06/08-42-04.670/
Render Image 15199915
fs_contents ['SQ00014819__2016-05-23T08_51_51-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-27/2024-06/06/08-42-04.670/SQ00014819__2016-05-23T08_51_51-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014819__2016-05-23T08_51_51-Measurement1.ome.zarr

Fileset: 6320661 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-37/2024-06/06/13-32-34.540/
Render Image 15203371
fs_contents ['SQ00014820__2016-05-25T21_16_25-Measurement1.ome.zarr']
Link from /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-37/2024-06/06/13-32-34.540/SQ00014820__2016-05-25T21_16_25-Measurement1.ome.zarr to /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00014820__2016-05-25T21_16_25-Measurement1.ome.zarr

Fileset: 6320662 /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-34/2024-06/06/18-46-57.670/
Render Image 15206827...

While browsing webclient while still running, got DatabaseBusyException

DatabaseBusyException
Traceback (most recent call last):

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omeroweb/decorators.py", line 538, in wrapped
    retval = f(request, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omeroweb/decorators.py", line 597, in wrapper
    context = f(request, *args, **kwargs)

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omeroweb/webclient/views.py", line 1798, in load_metadata_preview
    manager = BaseContainer(conn, **{str(c_type): int(c_id)})

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omeroweb/webclient/controller/container.py", line 117, in __init__
    self.well = self.conn.getObject("Well", well)

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omero/gateway/__init__.py", line 3225, in getObject
    result = self.getQueryService().findByQuery(

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omero/gateway/__init__.py", line 5056, in __getattr__
    obj = self._obj or self._getObj()

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omero/gateway/__init__.py", line 4987, in _getObj
    self._obj = self._create_func()

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omero/gateway/__init__.py", line 4963, in cf
    obj = getattr(self._conn.c.sf, self._func_str)()

  File "/opt/omero/web/venv3/lib64/python3.9/site-packages/omero_API_ice.py", line 758, in getQueryService
    return _M_omero.api.ServiceFactory._op_getQueryService.invoke(self, ((), _ctx))

Ice.UnknownException: exception ::Ice::UnknownException
{
    unknown = ome.conditions.DatabaseBusyException: cannot create transaction
	at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:289)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:461)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:277)
	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.$Proxy92.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.blitz.impl.ServiceFactoryI.isGuest(ServiceFactoryI.java:571)
	at ome.services.blitz.impl.ServiceFactoryI.disallowGuest(ServiceFactoryI.java:585)
	at ome.services.blitz.impl.ServiceFactoryI.getByName(ServiceFactoryI.java:438)
	at ome.services.blitz.impl.ServiceFactoryI.getByName(ServiceFactoryI.java:430)
	at ome.services.blitz.impl.ServiceFactoryI.getQueryService(ServiceFactoryI.java:309)
	at omero.api._ServiceFactoryTie.getQueryService(_ServiceFactoryTie.java:185)
	at omero.api._ServiceFactoryDisp.___getQueryService(_ServiceFactoryDisp.java:626)
	at omero.api._ServiceFactoryDisp.__dispatch(_ServiceFactoryDisp.java:1303)
	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)

}

<WSGIRequest: GET '/webclient/metadata_preview/well/2309094/?_=1722897262922'>

@will-moore
Copy link
Member Author

will-moore commented Aug 6, 2024

Re-ran

python scripts/managed_repo_symlinks.py Screen:3503 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report >> /tmp/idr0125_symlinks_20240806.log

Looks good this time - All 94 Plates completed... in ~3 hours
Script started at 6.40 BST, completed 9:30 (based on time of last link 8:30 GMT)

bash-5.1$ grep "Render Image" /tmp/idr0125_symlinks_20240806.log | wc
     94     282    2068

bash-5.1$ ls -lh /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-38/2024-06/26/06-17-38.755/
total 0
lrwxrwxrwx. 1 omero-server omero-server 142 Aug  6 08:30 SQ00015171__2016-04-21T16_22_35-Measurement1.ome.zarr -> /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr/SQ00015171__2016-04-21T16_22_35-Measurement1.ome.zarr

Repeat with remaining 37 plates in temp Screen:3504 - add to same log...

python scripts/managed_repo_symlinks.py Screen:3504 cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report >> /tmp/idr0125_symlinks_20240806.log

EDIT (7th Aug) - Mistake in previous command - missed the leading /
Running again (much faster since Images are rendered already)

$ python scripts/managed_repo_symlinks.py Screen:3504 /cellpainting-gallery/cpg0004-lincs/broad/images/2016_04_01_a549_48hr_batch1/images_zarr --repo /data/OMERO/ManagedRepository --report >> /tmp/idr0125_symlinks_20240807.log

(venv3) bash-5.1$ grep "Link from" /tmp/idr0125_symlinks_20240807.log | wc
     37     185   11248

@will-moore
Copy link
Member Author

will-moore commented Aug 8, 2024

Trying to view images in webclient to trigger memo file regeneration:

Taking a very long time, with occasional DatabaseBusy exceptions -> restart server...

Checking logs for memo saving times for one plate give 4 results, all starting within a couple of seconds and taking 5 hours! I wonder if clicking in webclient can trigger multiple memo generations in parallel? Probably better to use script.

(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ grep -A 3 "SQ00014818__2016-05-23T10_30_25" /opt/omero/server/OMERO.server/var/log/Blitz-0.log | grep -A 3 "saved memo"
2024-08-08 03:32:16,840 DEBUG [                   loci.formats.Memoizer] (l.Server-3) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo (6996491 bytes)
2024-08-08 03:32:16,840 DEBUG [                   loci.formats.Memoizer] (l.Server-3) start[1723069481615] time[18455225] tag[loci.formats.Memoizer.setId]
2024-08-08 03:32:16,840 INFO  [                ome.io.nio.PixelsService] (l.Server-3) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/METADATA.ome.xml Series: 1575
2024-08-08 03:32:16,847 INFO  [      ome.services.OmeroFilePathResolver] (l.Server-3) Metadata only file, resulting path: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/METADATA.ome.xml
--
2024-08-08 03:32:16,909 DEBUG [                   loci.formats.Memoizer] (l.Server-1) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo (6996491 bytes)
2024-08-08 03:32:16,909 DEBUG [                   loci.formats.Memoizer] (l.Server-1) start[1723069491280] time[18445628] tag[loci.formats.Memoizer.setId]
2024-08-08 03:32:16,909 INFO  [                ome.io.nio.PixelsService] (l.Server-1) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/METADATA.ome.xml Series: 0
2024-08-08 03:32:16,910 INFO  [                 org.perf4j.TimingLogger] (l.Server-1) start[1723069491275] time[18445635] tag[omero.call.success.ome.services.RenderingBean$12.doWork]
--
2024-08-08 03:32:17,098 DEBUG [                   loci.formats.Memoizer] (l.Server-4) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo (6996491 bytes)
2024-08-08 03:32:17,099 DEBUG [                   loci.formats.Memoizer] (l.Server-4) start[1723069481453] time[18455645] tag[loci.formats.Memoizer.setId]
2024-08-08 03:32:17,099 INFO  [                ome.io.nio.PixelsService] (l.Server-4) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/METADATA.ome.xml Series: 648
2024-08-08 03:32:17,145 INFO  [ome.services.sessions.state.SessionCache] (2-thread-3) Destroying session 00807f1d-2eeb-474f-8c81-2d0cdad62308 due to : Timeout
--
2024-08-08 03:32:17,160 DEBUG [                   loci.formats.Memoizer] (l.Server-5) saved memo file: /data/OMERO/BioFormatsCache/data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/.METADATA.ome.xml.bfmemo (6996491 bytes)
2024-08-08 03:32:17,160 DEBUG [                   loci.formats.Memoizer] (l.Server-5) start[1723069491451] time[18445708] tag[loci.formats.Memoizer.setId]
2024-08-08 03:32:17,160 INFO  [                ome.io.nio.PixelsService] (l.Server-5) Creating BfPixelBuffer: /data/OMERO/ManagedRepository/demo_2/Blitz-0-Ice.ThreadPool.Server-23/2024-06/06/03-51-10.329/SQ00014818__2016-05-23T10_30_25-Measurement1.ome.zarr/OME/METADATA.ome.xml Series: 1
2024-08-08 03:32:17,189 INFO  [        ome.services.util.ServiceHandler] (2-thread-3)  Executor.doWork -- ome.services.sessions.SessionManagerImpl.reload[d03aac19-dbb9-477f-8983-298029bc6a0a]

@will-moore
Copy link
Member Author

will-moore commented Aug 8, 2024

Memo file generation:
As omero-server user

omero hql --limit -1 --ids-only --style csv 'select MIN(field.image.id) FROM WellSample AS field where field.well.plate.id in (select link.child.id from ScreenPlateLink as link where link.parent.id=3503) GROUP BY field.well.plate' > idr0125_plates.txt

Remove first row, then

cut -d ',' -f2 idr0125_plates.txt | sed -e 's/^/Image:/' > idr0125_plate_ids.txt

screen -dmS cache parallel --eta -a idr0125_plate_ids.txt --results /tmp/memo_idr0125_20240808/ -j10 '/opt/omero/server/OMERO.server/bin/omero render -s localhost -u public -w public test --force'

Memo generation took about an hour for each Plate (first 3 were already done):

(base) [wmoore@pilot-idrngff-omeroreadwrite ~]$ grep ok /tmp/memo_idr0125_20240808/1/**/**
/tmp/memo_idr0125_20240808/1/Image:15193003/stdout:ok: Pixels:15193003 Image:15193003 2.009263277053833 
/tmp/memo_idr0125_20240808/1/Image:15196459/stdout:ok: Pixels:15196459 Image:15196459 2.880405902862549 
/tmp/memo_idr0125_20240808/1/Image:15199915/stdout:ok: Pixels:15199915 Image:15199915 2.134599447250366 
/tmp/memo_idr0125_20240808/1/Image:15203371/stdout:ok: Pixels:15203371 Image:15203371 3689.8124442100525 
/tmp/memo_idr0125_20240808/1/Image:15206827/stdout:ok: Pixels:15206827 Image:15206827 3754.8339743614197 
/tmp/memo_idr0125_20240808/1/Image:15210283/stdout:ok: Pixels:15210283 Image:15210283 3674.200692176819 
...

and the last one completed about 7am on the 9th (today). Took approx 13 hours. 👍

@will-moore
Copy link
Member Author

Copy rendering settings to 131 plates...
Instead of for loop (above)...

for i in {10562..10692}; do
    echo "$i"
    omero --debug=2 render copy Image:15175723 Plate:$i > /tmp/idr0125_copyplate_$i.log 2>/tmp/idr0125_copyplate_$i.err
done

Let's try to use parallel...
First make list of plates (all sequential IDs):

for i in {10562..10692}; do
    echo "Plate:$i" >> idr0125_ids_plates.txt
done

Then... using demo login...

export $PASS=secret

screen -dmS cache parallel --eta -a idr0125_ids_plates.txt --results /tmp/copyplate_idr0125_20240809/ -j10 '/opt/omero/server/OMERO.server/bin/omero render -s localhost -u demo -w $PASS copy Image:15175723'

@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/ome-ngff-data-in-the-idr/98630/3

@will-moore
Copy link
Member Author

for i in {10562..10692}; do
grep "100 images" /tmp/copyplate_idr0125_20240809/1/Plate:$i/stdout | wc
done

Not 34 in the following Plates:

10568 (33) - SQ00015043 P9 Field 1
10605 (33) - SQ00015120 P1 Field 6
10633 (33) - SQ00015148 P24 Field 6
10657 (33) - SQ00015173 O19 Field 2
10659 (33) - SQ00015195 B23 Field 5
10661 (33) - SQ00015197 P1 Field 1
10662 (32) - SQ00015198 P1 Fields 2-8, P21 Field 2
10671 (33) - SQ00015207 P1 (missing Well), O1 Fields 1, 3-9,
10672 (33) - SQ00015208 B22 Field 5

@will-moore
Copy link
Member Author

Annotations...

(base) [wmoore@pilot-idrngff-omeroreadwrite metadata]$ sudo -Es git clone git@github.com:IDR/idr0125-way-cellpainting.git

omero-server

$ omero metadata populate --report --batch 1000 --file screenA/idr0125-screenA-annotation.csv Screen:3503

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: check_pixels
Development

No branches or pull requests

2 participants