-
Notifications
You must be signed in to change notification settings - Fork 249
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 Cochran-Mantel-Haenszel statistical test for association #14255
Add Cochran-Mantel-Haenszel statistical test for association #14255
Conversation
This is great, thanks for working on this!
The code that sets up the doctest environment is here. In particular, the matrixtable available in doc examples as
|
Thanks, this is exactly what I was looking for. I am having trouble testing my new example locally though. When I run
|
Unfortunately, running doctests locally has always been a bit of a mess. I don't think any of us ever run them locally, we just let CI handle it. If you want to sort out local doctests I'd suggest starting a thread in zulip asking for help. But it looks like your latest commit has passed all tests in CI. Just dismiss my review when you're ready for another look. I think this is looking ready to merge. |
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.
Thanks for the contribution!
Thanks for reviewing! |
Unfortunately, the CI results are private to protect against inadvertent secret leaks. It looks like the docs are failing. The I suspect the test will pass with that change.
|
I was able to get the doctests running locally, and I got As Dan mentioned, I cannot see the output of the CI tests. I will try rebasing onto the main branch. |
7af9cab
to
270c303
Compare
181c5f8
to
c4df2d1
Compare
Description
In this pull request, I add a function to perform a Cochran-Mantel-Haenszel statistical test for association.
This pull request closes #13481.
Testing
I add unit tests. Since I have not used R before (the associated GitHub issue suggests using R to create test cases), I created the unit tests from examples that I found on the internet. I linked these sources in the code for the unit tests.
I built the documentation locally and inspected it to confirm that it matches my expectations.
I am having trouble testing the docstring examples locally. When I run
make -C hail doctest-query
, the tests error due to a checksum exception.Discussion
I have not added an example to the documentation that uses a matrix table yet. (This is an acceptance criteria in #13481.) I wanted to get some advice about the best way to do this. I think ideally, the example would have a binary phenotype, an allele to test for association, and some stratifying variable. I tried to search through the existing code to find suitable example matrix tables in the docstrings, but I didn't find anything promising. I would appreciate help here.Update: thanks to @patrick-schultz's recommendation, I have added an example using a matrix table.