-
Notifications
You must be signed in to change notification settings - Fork 7
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
Kindepth for double marriage #33
Comments
What I've found to control that is to do the following: if (length(abad) == 1 && sum(c(dads, moms) == bad) == 1) {
...
else {
## Ancestors of the 'good' side
agood <- c(good, ancestors(good, midx, didx))
## If individual already in agood they aren't really bad
abad1 <- abad[!abad %in% agood]
## For spouse chasing, I need to exclude the given pair
tdad <- dads[-who]
tmom <- moms[-who]
## Get all individuals affiliated to agood
while (TRUE) { ... }
## Update agood but only if not in abad1
agood <- agood[!agood %in% abad1]
...
} By doing so we keep a good kindepth measure in all case I have for now. |
Louis,
If your solution fixes the problem with aligning subjects 5,6,9,10 with the correct generation, while also not breaking other test cases, I am in favor.
Are you making the fix in a branch of kinship2, or in your Bioconductor version, or both?
…-Jason
From: Louis LE NEZET ***@***.***>
Sent: Tuesday, November 14, 2023 7:17 AM
To: mayoverse/kinship2 ***@***.***>
Cc: Sinnwell, Jason P. ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] Re: [mayoverse/kinship2] Kindepth for double marriage (Issue #33)
What I've found to control that is to do the following:
if (length(abad) == 1 && sum(c(dads, moms) == bad) == 1) {
...
else {
## Ancestors of the 'good' side
agood <- c(good, ancestors(good, midx, didx))
## If individual already in agood they aren't really bad
abad1 <- abad[!abad %in% agood]
## For spouse chasing, I need to exclude the given pair
tdad <- dads[-who]
tmom <- moms[-who]
## Get all individuals affiliated to agood
while (TRUE) { ... }
## Update agood but only if not in abad1
agood <- agood[!agood %in% abad1]
...
}
By doing so we keep a good kindepth measure in all case I have for now.
What do you think ?
-
Reply to this email directly, view it on GitHub<#33 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AB574QERHUVAUSPXSW7YSW3YENVOBAVCNFSM6AAAAAA7KU3HG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQGE4DOMBZGY>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Hi Jason, I've added this change to the current "Pedixplorer" package for Bioconductor. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @sinnweja,
I'm nearly done for the new package.
I've recently discovered a subtle use case where the kindepth is not nicely computed:
Here is the code:
We get
What would be better is to to have a kindepth of
The problem seems to come in the loop that update the
agood
ancestors.In the case of a double marriage like in the previous pedigree, the loop will iterate and will add the individuals as follow:
The individuals 10, 5, 6 and 9 should not be added to be able to modify them.
What would be the best way to control for this case ?
Best,
Louis
The text was updated successfully, but these errors were encountered: