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 optional parameters to set_female_y_metrics_to_na_expr to use other frequency fields #635

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

jkgoodrich
Copy link
Contributor

No description provided.

Copy link
Contributor

@ch-kr ch-kr left a comment

Choose a reason for hiding this comment

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

a couple comments that aren't urgent; changes LGTM

@@ -1046,31 +1046,45 @@ def missing_callstats_expr() -> hl.expr.StructExpression:


def set_female_y_metrics_to_na_expr(
t: Union[hl.Table, hl.MatrixTable]
t: Union[hl.Table, hl.MatrixTable],
Copy link
Contributor

Choose a reason for hiding this comment

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

it would be a breaking change, but we could avoid passing in a Table or MatrixTable if freq_expr, freq_meta_expr, and freq_index_dict_expr only accept HailExpressions, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, but I don't feel like going through an changing the things that we already ran this release that use that, I think it's cleaner to just leave as is for the next pypi release


:param t: Table or MatrixTable for which to adjust female metrics
:return: Hail array expression to set female Y-variant metrics to missing values
"""
female_idx = hl.map(
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should make this

    xx_idx = hl.map(

since we've been moving away from using gender terms for our sex assignments (though I guess maybe we should rename the function also, which is also a breaking change)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a post v4 change, we can do an overhaul for that and population

@jkgoodrich jkgoodrich merged commit f0b8c42 into main Oct 24, 2023
3 checks passed
@jkgoodrich jkgoodrich deleted the jg/update_set_female_y_metrics_to_na_expr branch October 24, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants