-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add documentation for Hail interoperation #310
Conversation
Signed-off-by: Karen Feng <[email protected]>
Signed-off-by: Karen Feng <[email protected]>
Signed-off-by: Karen Feng <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #310 +/- ##
=======================================
Coverage 93.62% 93.62%
=======================================
Files 95 95
Lines 4812 4812
Branches 456 456
=======================================
Hits 4505 4505
Misses 307 307 Continue to review full report at Codecov.
|
…l-interop-docs
@henrydavidge Ready for review on this one; I'm not sure why the tests are failing though. |
Signed-off-by: Karen Feng <[email protected]>
build.sbt
Outdated
.settings( | ||
pythonSettings, | ||
test in Test := { | ||
hailtest.toTask(" --doctest-modules python/glow/hail/").value | ||
hailtest.toTask(" --doctest-modules python/glow/hail/ docs/source/etl/hail.rst").value |
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.
nit: make this into a variable hailPaths
in case we have more hail related docs in the future
python/glow/hail/functions.py
Outdated
@@ -156,6 +154,8 @@ def from_matrix_table(mt: MatrixTable, include_sample_ids: bool = True) -> DataF | |||
""" | |||
Converts a Hail MatrixTable to a Glow DataFrame. | |||
|
|||
Requires that the MatrixTable rows contain locus and alleles fields. | |||
|
|||
Args: | |||
mt : The Hail MatrixTable to convert | |||
include_sample_ids : If true, include sample IDs in the Glow DataFrame |
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.
nit: could you document why you might want this to be false?
python/glow/hail/functions.py
Outdated
@@ -156,6 +154,8 @@ def from_matrix_table(mt: MatrixTable, include_sample_ids: bool = True) -> DataF | |||
""" | |||
Converts a Hail MatrixTable to a Glow DataFrame. |
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.
Could you describe what the schema will look like? How is it translated from the Hail schema?
Signed-off-by: Karen Feng <[email protected]>
Signed-off-by: Karen Feng <[email protected]>
Signed-off-by: Karen Feng <[email protected]>
What changes are proposed in this pull request?
Add docs for the Hail interop function
from_matrix_table
, which will be available in 0.7.Also fixes a bug in the aforementioned function; previously, missing names were represented as an empty array; this should be null.
How is this patch tested?
Includes docs-side testing in
hail/test
. This is chained to our Python-side testing to leverage the Spark-Hail setup; otherwise, we'd have to copypython/glow/hail/conftest.py
to the docs.