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

FileNotFoundError: '.zmetadata' on variant_calls() #712

Open
jchiefelk opened this issue Jan 23, 2025 · 5 comments
Open

FileNotFoundError: '.zmetadata' on variant_calls() #712

jchiefelk opened this issue Jan 23, 2025 · 5 comments
Labels
question Further information is requested

Comments

@jchiefelk
Copy link

This error is thrown when making a variant call from a Pv4 or Pf7 object. variant_calls(). The source of this error is in on line 80 of plamodium.py here, https://github.com/malariagen/malariagen-data-python/blob/master/malariagen_data/plasmodium.py#L80

I created an instance of Pf7 or Pv4 using a local copy of the releases, examplepf7 = malariagen_data.Pf7("/local/path/to/pf7_release/"). I did fill out the Google Form, but I didn't want to wait to get SNP data I need.

@leehart leehart added the triage label Jan 28, 2025
@leehart
Copy link
Collaborator

leehart commented Jan 28, 2025

@eselimnl @podpearson Any ideas?

@eselimnl
Copy link
Collaborator

Hi @jchiefelk, it is interesting that your local copy is missing the .zmetadata files. Have you downloaded this copy from ftp://ngs.sanger.ac.uk/production/malaria/Resource/34/Pf7.zarr.zip?

I hope you can generate the missing file yourselves with the following lines of codes:

import zarr
from zarr.storage import DirectoryStore

store = DirectoryStore("/local/path/to/pf7_release/")
zarr_group = zarr.open(store)
zarr.consolidate_metadata(store)

Please me know if you have any issues.

@jchiefelk
Copy link
Author

@eselimnl - I downloaded the data from Figshare. I didn't have permissions to ftp://ngs.sanger.ac.uk/production/malaria/Resource/34/Pf7.zarr.zip

@eselimnl
Copy link
Collaborator

Thanks for getting back. I couldn't find the genotype calls file (zarr) on figshare, to make sure please check if you have downloaded Pf7.zarr.zip. This file is publicly available for download via FTP. If you’re on a Linux/macOS system, please try:

wget -c ftp://ngs.sanger.ac.uk/production/malaria/Resource/34/Pf7.zarr.zip
Since the file is 550GB, the download may take several hours depending on your network speed.

@leehart
Copy link
Collaborator

leehart commented Jan 30, 2025

Thanks @eselimnl . Hi @jchiefelk . Please let us know whether using the public FTP resource resolves your issue. Out of curiosity, did you try consolidating the metadata of your local Zarr? As @eselimnl suggests, this ought to re-generate any missing .zmetadata files.

@leehart leehart added question Further information is requested and removed triage labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants