Issues with accessing SR matrices using python/ zarr / FSMap error

41 views
Skip to first unread message

Ana Mazmishvili

unread,
Feb 25, 2025, 9:38:43 PMFeb 25
to inmap-users

I am very new to InMap and I would really appreciate your help on these issues:

I followed the tutorial (2019) to access the SR matrix directly from Amazon S3. However, I encountered an issue with the zarr.open function:

  1. sr = zarr.open(s3fs.S3Map(url, s3=fs, check=False), mode="r")

    The error message I’m getting is:
    TypeError: Unsupported type for store_like: 'FSMap'

    I searched online and also tried using AI tools to resolve this, but nothing has worked so far. I suspect this might be a version compatibility issue with Zarr. Have you encountered this issue before? If so, could you let me know which version of Zarr you used when using this code? Any suggestions on how to resolve it would be greatly appreciated.

  2. Since I was unable to access the matrix directly from Amazon S3, I tried the alternative approach of accessing it from local files. I downloaded the isrm_v1.2.1.zip file, extracted it, and found isrm_v1.2.1.ncf. However, I ran into issues opening it using:

    sr = zarr.open("isrm_v1.2.1.zarr", mode="r")

    Since the extracted file was not in .zarr format, I attempted to convert the .ncf file, but I’m not sure if that’s the right approach. The conversion wasn’t successful. Is there an available Zarr format of the SR matrix, or am I missing something? Thank you for your help!

Anil Gogebakan

unread,
Feb 25, 2025, 11:40:01 PMFeb 25
to inmap-users
Hi,

I think, you forgot to define fs. For me, the following three lines were working "
url = 's3://inmap-model/isrm_v1.2.1.zarr/'
fs = s3fs.S3FileSystem(anon=True)
sr = zarr.open(s3fs.S3Map(url, s3=fs, check=False), mode="a") # mode can be "a", "w", "c" or "r"
I'd not comment on the second question, as I strongly recommend not downloading them as you probably need a lot of computational memory on your computer. That is the reason why it is stored in s3fs.

Hope this helps,

Anil G.

Ana Mazmishvili

unread,
Feb 26, 2025, 2:50:13 AMFeb 26
to inmap-users
Thanks a lot, Anil for your prompt reply. I appreciate it a lot!
I fixed the problem by installing the old version (V2.8) of zarr package. 
Reply all
Reply to author
Forward
0 new messages