IDR / omero-mkngff

Plugin to swap OMERO filesets with NGFF
GNU General Public License v2.0
0 stars 2 forks source link

Alt store bfoptions #17

Closed will-moore closed 3 months ago

will-moore commented 4 months ago

Fixes #15.

Add support for adding the clientpath as the omezarr.alt_store to the bfoptions file created beside the symlink.

See https://github.com/ome/ZarrReader/pull/82

will-moore commented 4 months ago

To test:

pip install git+https://github.com/IDR/omero-mkngff.git@refs/pull/17/head

As omero-server, delete the manually created bfoptions for idr0025

bash-4.2$ rm /data/OMERO/ManagedRepository/demo_2/2017-03/13/15-19-51.590_mkngff/52304cdf-4eba-4f0a-84b1-690e0d66add9.zarr.bfoptions 
bash-4.2$ 
bash-4.2$ rm /data/OMERO/ManagedRepository/demo_2/2017-03/17/15-15-54.747_mkngff/72cc291b-a4e0-4807-bd23-22e9ad75c0dd.zarr.bfoptions 
bash-4.2$ cat /data/OMERO/ManagedRepository/demo_2/2017-03/13/15-26-46.818_mkngff/3c534b4f-12be-4881-a84a-af6b65e142ea.zarr.bfoptions 
omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/S-BIAD846/3c534b4f-12be-4881-a84a-af6b65e142ea/3c534b4f-12be-4881-a84a-af6b65e142ea.zarr
bash-4.2$ 
bash-4.2$ rm !$
rm /data/OMERO/ManagedRepository/demo_2/2017-03/13/15-26-46.818_mkngff/3c534b4f-12be-4881-a84a-af6b65e142ea.zarr.bfoptions

Then create again with omero-mkngff...

git clone https://github.com/IDR/mkngff_upgrade_scripts.git
cd ngff_filesets
export IDRID=idr0025

for r in $(cat $IDRID.csv); do
  biapath=$(echo $r | cut -d',' -f2)
  uuid=$(echo $biapath | cut -d'/' -f2)
  fsid=$(echo $r | cut -d',' -f3 | tr -d '[:space:]')
  omero mkngff symlink /data/OMERO/ManagedRepository $fsid "/bia-integrator-data/$biapath/$uuid.zarr" --bfoptions --clientpath="https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/$biapath/$uuid.zarr"
done

...
Checking for prefix_dir /data/OMERO/ManagedRepository/demo_2/2017-03/17/15-15-54.747
write bfoptions to: /data/OMERO/ManagedRepository/demo_2/2017-03/17/15-15-54.747_mkngff/72cc291b-a4e0-4807-bd23-22e9ad75c0dd.zarr.bfoptions

Check bfoptions...

(venv3) bash-4.2$ cat /data/OMERO/ManagedRepository/demo_2/2017-03/17/15-15-54.747_mkngff/72cc291b-a4e0-4807-bd23-22e9ad75c0dd.zarr.bfoptions
omezarr.list_pixels=false
omezarr.quick_read=true
omezarr.alt_store=https://uk1s3.embassy.ebi.ac.uk/bia-integrator-data/S-BIAD846/72cc291b-a4e0-4807-bd23-22e9ad75c0dd/72cc291b-a4e0-4807-bd23-22e9ad75c0dd.zarr

Looks good.

will-moore commented 4 months ago

@joshmoore - This is working at https://github.com/IDR/idr-metadata/issues/675#issuecomment-2050137532 and ready to be reviewed, thx.

jburel commented 3 months ago

This is now conflicting

joshmoore commented 3 months ago

Changes generally look good. If we ever decide to move this outside of IDR, we probably want a round of refactoring, but once the conflict is fixed, :+1:

will-moore commented 3 months ago

@joshmoore - Good to merge now? Thanks (I can't merge)

joshmoore commented 3 months ago

@joshmoore - Good to merge now? Thanks (I can't merge)

Should work now. Merging.