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

Option matchID in pedigreeCross() and pedigreeCross2() does not work #7

Open
AudreyAAMartin opened this issue Feb 15, 2024 · 2 comments

Comments

@AudreyAAMartin
Copy link

matchID should allow to match founders with a specific ID within the population to be created by pedigreeCross. It works when founders are all on top of the pedigree, eg 1:n first individuals, but it won't work if there are founders (full/half) further down the pedigree. Those founders ID should be attributed directly when creating the founderpop which is not an option. The second option is to recode the pedigree accordingly with all founders as 1:n but problematic with sortPed() (linked to #6 (comment)).

Error can be reproduced by simply calling pedigreeCross with matchID set to TRUE.

founderPop = quickHaplo(nInd=5, nChr=1, segSites=10)
SP = SimParam$new(founderPop)
pop = newPop(founderPop, simParam=SP)
id = 1:10
mother = c(0,0,0,0,1,1,2,7,0,7)
father = c(0,0,0,0,3,3,4,5,6,6)
pop2 = pedigreeCross(pop, id, mother, father, simParam=SP, matchID = TRUE)
@gregorgorjanc
Copy link
Owner

@AudreyAAMartin again paste the error so we have all the info on how to move onwards

@AudreyAAMartin
Copy link
Author

The error is because it is trying to match the ped ID and the ID within founderpop

Error in pedigreeCross(pop, id, mother, father, simParam = SP, matchID = TRUE) : 
  The following founders are missing: 0 

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

No branches or pull requests

2 participants