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

Changed or to and in set_female_metrics_to_na #347

Merged
merged 2 commits into from
Mar 17, 2021
Merged

Changed or to and in set_female_metrics_to_na #347

merged 2 commits into from
Mar 17, 2021

Conversation

ch-kr
Copy link
Contributor

@ch-kr ch-kr commented Mar 17, 2021

Function previously was not correctly setting metrics to missing on chrY (XX samples only). For example:

+----------+---------+
| locus         | alleles     | ac_xx_adj | y_par | y_nonpar | y_conds |
+---------------+-------------+-----------+-------+----------+---------+
| locus<GRCh38> | array<str>  |     int32 |  bool |     bool |    bool |
+---------------+-------------+-----------+-------+----------+---------+
| chrY:2786709  | ["G","T"]   |        NA | false |     true |    true |
| chrY:2786719  | ["C","A"]   |         0 | false |     true |    true |
  • y_par is an annotation showing whether the locus is in a pseudoautosomal region of chromosome Y
  • y_nonpar is an annotation showing whether the locus is in a non-pseudoautosomal region of chromosome Y
  • y_conds is an annotation with the following condition: (~locus.in_y_nonpar() | ~locus.in_y_par())

ac_xx_adj should be NA on both lines, but you can see that on both lines, y_conds evaluates to True, which means line 779 will return the original value of this metric (and not missing).

@ch-kr ch-kr requested a review from mike-w-wilson March 17, 2021 14:40
Copy link
Contributor

@mike-w-wilson mike-w-wilson left a comment

Choose a reason for hiding this comment

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

LGTM!

@mike-w-wilson mike-w-wilson merged commit 8226990 into master Mar 17, 2021
@mike-w-wilson mike-w-wilson deleted the chrY branch March 17, 2021 14:55
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