Skip to content

Conversation

jkgoodrich
Copy link
Contributor

Fix compute_related_samples_to_drop when min_related_hard_filter or filtered_samples are used to build a list of additional samples to drop.

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! -- two questions for my knowledge but not critical for merging

.when(
kin_expr > duplicate_twin_min_kin,
hl.if_else(
dup_twin_ibd1_expr & (y_expr < parent_child_max_y),
Copy link
Contributor

Choose a reason for hiding this comment

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

So there are cases where the kinship coefficient is > 0.42 and (IBD0 or IBS0 or IBD0/IBS0) > some small number? I can't remember the figures but is this what triggered that very long investigation into what turned out to be oceania samples?

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, it's not really important for cuKING, but I added it for support with our PC-Relate IBD0, and yes I think it probably has to do with that long investigation
Screen Shot 2023-02-10 at 9 16 23 AM

min_related_hard_filter,
)
gbi = relatedness_ht.annotate(s=list(relatedness_ht.key))
gbi = relatedness_ht.annotate(s=[relatedness_ht.key[0], relatedness_ht.key[1]])
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change for readability or does casting no longer work?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or I guess speed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

list(relatedness_ht.key) returns ['i', 'j'] for each s, I'm assuming this was something that changed and was not always the case, but I couldn't confirm.

@jkgoodrich jkgoodrich merged commit 30d097d into main Feb 10, 2023
@jkgoodrich jkgoodrich deleted the jg/ibs_relationship_function branch February 10, 2023 16:19
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