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

Modifications to annotate_freq to improve memory use #577

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

jkgoodrich
Copy link
Contributor

No description provided.

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.

I really like this. The logic all looks great and this is way cleaner on top of improving performance. I just have a couple suggestions and questions.

gnomad/utils/annotations.py Outdated Show resolved Hide resolved
gnomad/utils/annotations.py Outdated Show resolved Hide resolved
freq_expr = freq_expr.map(
lambda cs: cs.annotate(
AC=cs.AC[1],
# TODO: This is NA in case AC and AN are 0 -- should we set it to 0?
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we address this here? This TODO has been in here for a while. We could ask in a channel what the preference is for the HT. The browser displays 0 when AN is 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, can you initiate the conversation?

gnomad/utils/annotations.py Outdated Show resolved Hide resolved
gnomad/utils/annotations.py Show resolved Hide resolved
gnomad/utils/annotations.py Outdated Show resolved Hide resolved
jkgoodrich and others added 2 commits August 16, 2023 12:31
Co-authored-by: Mike Wilson <mwilson@broadinstitute.org>
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 a089bbc into main Aug 16, 2023
@jkgoodrich jkgoodrich deleted the jg/frequency_changes_improve_memory branch April 3, 2024 16:40
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