-
Notifications
You must be signed in to change notification settings - Fork 32
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
sgkit-plink IO merger #277
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. _io: | ||
|
||
IOs | ||
=== | ||
|
||
PLINK | ||
----- | ||
|
||
The :func:`sgkit.io.plink.read_plink` loads a single PLINK dataset as Dask | ||
arrays within an `xr.Dataset` from bed, bim, and fam files. | ||
|
||
PLINK IO support is an "extra" feature within sgkit and requires additional | ||
dependencies. To install sgkit with PLINK support using pip:: | ||
|
||
$ pip install git+https://github.com/pystatgen/sgkit#egg=sgkit[plink] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ statsmodels | |
zarr | ||
msprime | ||
scikit-learn | ||
partd | ||
fsspec | ||
bed-reader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
try: | ||
from .plink_reader import read_plink # noqa: F401 | ||
|
||
__all__ = ["read_plink"] | ||
except ImportError as e: | ||
msg = ( | ||
"sgkit-plink requirements are not installed.\n\n" | ||
"Please install them via pip :\n\n" | ||
" pip install 'git+https://github.com/pystatgen/sgkit#egg=sgkit[plink]'" | ||
) | ||
raise ImportError(str(e) + "\n\n" + msg) from e |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see where dask[dataframe] actually gets installed - it looks like only its dependencies get installed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomwhite see the comment above (https://github.com/pystatgen/sgkit/pull/277/files#diff-380c6a8ebbbce17d55d50ef17d3cf906R41-R51) for the context. Does that make sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes sense, but I'm still missing something: where is the
dask[dataframe]
dependency declared? It's used bypysnptools.py
, but how does it get installed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dask[dataframe]
is not an "actual" dependency, it's an extra indask
, and since we already installdask
viadask[array]
ininstall_requires
and since it's an extra in our extras (which this bug in pip affects) we can't really listdask[dataframe]
as a dependency (unless we use the 2020 pip resolver), so we have the options outlined in the comment above, so instead of forcing the extra flag on users, I opted for listing the missing dependencies that come fromdask[dataframe]
. Initial version of this PR actually used the 2020 resolver, but I reverted to listingdask[dataframe]
deps directly so that we can use plainpip
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it. I was missing the bit about
dask[dataframe]
not actually providing any Dask code.When the pip bug is fixed do you think we should switch to just add the
dask[dataframe]
dependency here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomwhite quick answer - sure. But that bug will be fixed by the 2020 resolver, right now 2020 resolver is available via feature flag, it is scheduled to be default in October this year, so we can wait until then + a couple of months and we should be good to switch over.