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

Can't open bgen using symbolic links #42

Open
jordanero opened this issue Jun 7, 2022 · 7 comments
Open

Can't open bgen using symbolic links #42

jordanero opened this issue Jun 7, 2022 · 7 comments
Assignees

Comments

@jordanero
Copy link

Hello,

I want to use the numpy inspired API to open an bgen using a symbolic link. I want to do this because I don't want to create the .metadata2.mmm file in the shared directory where the bgen lives. I thought I recalled being able to do this in a previous version of bgen-reader, but am running into the following problem now.

from bgen_reader import open_bgen
wha = open_bgen('/n/holylfs05/LABS/liang_lab_l3/Lab/jordan/ssctpr/data/ukbb_symbolic_link/ukb_imp_chr1_v3.bgen')
Traceback (most recent call last):
File "", line 1, in
File "/n/home_fasse/jrossen/.conda/envs/ssctpr2/lib/python3.9/site-packages/bgen_reader/_bgen2.py", line 133, in init
assert_file_exist(filepath)
File "/n/home_fasse/jrossen/.conda/envs/ssctpr2/lib/python3.9/site-packages/bgen_reader/_file.py", line 14, in assert_file_exist
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), filepath)

I don't have a very strong understanding of how PosixPath works, but after a little playing around, it seems like PosixPath precludes the use of symbolic links.

Either allowing for the use of symbolic links, or allowing the user to specify a directory where .metadata2.mmm should be created would solve my problem completely.

Thanks for making this software!

@CarlKCarlK
Copy link
Collaborator

CarlKCarlK commented Jun 7, 2022 via email

@CarlKCarlK
Copy link
Collaborator

CarlKCarlK commented Jun 7, 2022 via email

@jordanero
Copy link
Author

jordanero commented Jun 7, 2022

Was there some censoring done by github?

Your message reads:

Then install my private version from GitHub:
pip install @***

@CarlKCarlK
Copy link
Collaborator

CarlKCarlK commented Jun 7, 2022 via email

@CarlKCarlK
Copy link
Collaborator

Addressed by #44

@jordanero
Copy link
Author

Hi Carl, the update is working great! Sorry for taking so long to try it out.
I'm able to open a bgen with a metadata file in a different directory, and reuse that metadata file.
Thanks a lot.

@CarlKCarlK
Copy link
Collaborator

CarlKCarlK commented Aug 8, 2022 via email

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

3 participants