Skip to content

[query] Add simulate_random_mating#12722

Merged
danking merged 3 commits into
hail-is:mainfrom
tpoterba:random-mating
Mar 3, 2023
Merged

[query] Add simulate_random_mating#12722
danking merged 3 commits into
hail-is:mainfrom
tpoterba:random-mating

Conversation

@tpoterba

Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +62 to +64
ht = ht.annotate(__new_entries=ht.generations[1:].scan(
lambda prev_calls, generation_metadata: simulate_mating_calls(prev_calls, generation_metadata[0]),
ht.__entries.GT)[-1].map(lambda gt: hl.struct(GT=gt)))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could use a fold instead of a scan here, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, changed the design slightly and didn't adjust. Fixed.

@danking
danking merged commit 639f468 into hail-is:main Mar 3, 2023
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.

3 participants