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

KeyError: "Unable to open object (unable to open external file, external link file name = 'xxxxxx.h5')" #413

Open
yifangt-ACRD opened this issue Jun 14, 2024 · 0 comments

Comments

@yifangt-ACRD
Copy link

yifangt-ACRD commented Jun 14, 2024

Hello, I'm learning to use scikit-allel, but got stumped with the first step to read in HDF5 file following thetutorial:

callset_fn = 'data/2016-06-10/ag1000g.phase1.ar3.h5'
callset = h5py.File(callset_fn, mode='r')
callset
# <HDF5 file "ag1000g.phase1.ar3.h5" (mode r)>
chrom = '3L'
variants = allel.VariantChunkedTable(callset[chrom]['variants'], 
                                     names=['POS', 'REF', 'ALT', 'DP', 'MQ', 'QD', 'num_alleles'],
                                     index='POS')
"""
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "/home/yifang/miniconda3/envs/allel/lib/python3.12/site-packages/h5py/_hl/group.py", line 357, in __getitem__
    oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
  File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
  File "h5py/h5o.pyx", line 241, in h5py.h5o.open
KeyError: "Unable to open object (unable to open external file, external link file name = 'ag1000g.phase1.ar3.3L.h5')"
"""
assert callable(allel.VariantChunkedTable)
#nothing

Tried using a new h5df file converted freshly from VCF file, the error stays the same.
I'm using # scikit-allel 1.3.8 and # h5py 3.11.0.
Does anyone have any clue on the issue? Thanks a lot!

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

No branches or pull requests

1 participant