limix / bgen-reader-py

A BGEN file format reader.
MIT License
10 stars 3 forks source link

I get "Error while storing buffer: Permission denied" #7

Closed hyanwong closed 6 years ago

hyanwong commented 6 years ago

This is probably something to do with my setup (e.g. the BGEN files are in a read-only dir, and I don't know if I can write to the /tmp directory). It may also be a message output by the underlying bugs software. Even so, I think it would be useful to know if there is any way to solve it - a brief search online seems not to reveal anything.

horta commented 6 years ago

Hi @hyanwong , what were the steps to reproduce that problem? Did you call bgen_reader.create_metadata_file? If so, with which inputs?

hyanwong commented 6 years ago

I just followed the steps at https://github.com/limix/bgen-reader-py, having first installed bgen via conda (miniconda3/bin/conda install -c conda-forge bgen) then miniconda3/bin/pip3 install bgen-reader.

>>> from bgen_reader import read_bgen
>>> bgen = read_bgen("haplotypes/ukb_hap_chr20_v2.bgen", verbose=False)
Error while storing buffer: Permission denied

Permissions on the dir are

> ls -ld haplotypes
drwxr-x---. 2 admin bbgroup 8192 Jul 20  2017 haplotypes
hyanwong commented 6 years ago

Let me know if you need further debug information. E.g. is there a debug flag I can use?

horta commented 6 years ago

I think I know the problem. I will fix during the weekend. But for now you can pass metadata_file=False to read_bgen. It should skip the creation of that metadata file.

hyanwong commented 6 years ago

Yep, that temporary workaround did it for the time being, thanks