beatrizserrano / galaxy-image-community

Repository to manage project 17 at the BioHackathon Europe 2024
1 stars 1 forks source link

Adapt image analysis tools to consume OME-Zarr #27

Open beatrizserrano opened 2 weeks ago

kostrykin commented 2 weeks ago

Example from @annefou: (climate date)

import gcsfs
import xarray as xr
# Connect to Google Cloud Storage
fs = gcsfs.GCSFileSystem(token='anon', access='read_only')
# create a MutableMapping from a store URL
mapper = fs.get_mapper("gs://cmip6/CMIP6/CMIP/AS-RCEC/TaiESM1/1pctCO2/r1i1p1f1/Amon/hfls/gn/v20200225/")
# make sure to specify that metadata is consolidated
ds = xr.open_zarr(mapper, consolidated=True)