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

Add documentation for Hail interoperation #310

Merged
merged 8 commits into from
Nov 25, 2020

Conversation

karenfeng
Copy link
Collaborator

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?

  • Unit tests
  • Integration tests
  • Manual tests

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 copy python/glow/hail/conftest.py to the docs.

Signed-off-by: Karen Feng <[email protected]>
@codecov
Copy link

codecov bot commented Nov 20, 2020

Codecov Report

Merging #310 (c7139e7) into master (536d62a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 536d62a...c7139e7. Read the comment docs.

@karenfeng
Copy link
Collaborator Author

@henrydavidge Ready for review on this one; I'm not sure why the tests are failing though.

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
Copy link
Contributor

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

@@ -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
Copy link
Contributor

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?

@@ -156,6 +154,8 @@ def from_matrix_table(mt: MatrixTable, include_sample_ids: bool = True) -> DataF
"""
Converts a Hail MatrixTable to a Glow DataFrame.
Copy link
Contributor

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?

@karenfeng karenfeng merged commit 8d65ace into projectglow:master Nov 25, 2020
@karenfeng karenfeng deleted the hail-interop-docs branch November 25, 2020 21:18
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

Successfully merging this pull request may close these issues.

2 participants