Skip to content

sgkit-bgen merger #314

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

Merged
merged 8 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ scikit-learn
partd
fsspec
bed-reader
git+https://github.com/pangeo-data/rechunker.git
cbgen
cyvcf2; platform_system != "Windows"
yarl
9 changes: 7 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ vcf =
cyvcf2
fsspec
yarl
bgen =
rechunker
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this different than the dev-requirements? it can't be git based?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I originally had it that way but it doesn't work when you pip install sgkit from github which then tries to pip install rechunker from github. I'm not sure why but I'm instead treating it as an "abstract" dependency for now (e.g. pyscaffold/pyscaffold#261 (comment)). https://github.com/pystatgen/sgkit/issues/321 for when the required changes are released.

cbgen

[coverage:report]
fail_under = 100
Expand Down Expand Up @@ -115,10 +118,12 @@ ignore_missing_imports = True
ignore_missing_imports = True
[mypy-setuptools]
ignore_missing_imports = True
[mypy-sgkit_plink.*]
ignore_missing_imports = True
[mypy-sklearn.*]
ignore_missing_imports = True
[mypy-cbgen.*]
ignore_missing_imports = True
[mypy-rechunker.*]
ignore_missing_imports = True
[mypy-bed_reader.*]
ignore_missing_imports = True
[mypy-sphinx.*]
Expand Down
11 changes: 11 additions & 0 deletions sgkit/io/bgen/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
try:
from .bgen_reader import bgen_to_zarr, read_bgen, rechunk_bgen # noqa: F401

__all__ = ["read_bgen", "bgen_to_zarr", "rechunk_bgen"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if we actually need those __all__ variables? in this case for example I think this doesn't change anything?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did what you did with plink and tom with vcf. I plan on waiting until https://github.com/pystatgen/sgkit/pull/294 is done before making a decision on that.

except ImportError as e:
msg = (
"sgkit bgen requirements are not installed.\n\n"
"Please install them via pip :\n\n"
" pip install 'git+https://github.com/pystatgen/sgkit#egg=sgkit[bgen]'"
)
raise ImportError(str(e) + "\n\n" + msg) from e
Loading