-
Notifications
You must be signed in to change notification settings - Fork 31
Add determine_nearest_neighbors
to find nearest neighbors for each sample. Modify compute_stratified_metrics_filter
to work with a comparison_sample_expr
that specifies what samples to compare to for filtering, this works well with the output of determine_nearest_neighbor
.
#509
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
Conversation
…ples to compare to
gnomad/sample_qc/filtering.py
Outdated
nbr=explode_nbrs_ht[hl.int64(explode_nbrs_ht.nearest_neighbor_idxs)].s | ||
) | ||
explode_nbrs_ht = explode_nbrs_ht.group_by("s").aggregate( | ||
nearest_neighbors=hl.agg.collect_as_set(explode_nbrs_ht.nbr) |
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.
does maintaining the order when collecting matter?
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.
Oh good point, if we ever want to map to the nearest_neighbor_dists
array it needs to be in the same order
Co-authored-by: klaricch <[email protected]>
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.
lgtm (just need to add a label)
No description provided.