-
Notifications
You must be signed in to change notification settings - Fork 20
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
sortPed function bug #110
Comments
Just to add that the behaviour is
So all individuals have the same generation. |
This PR #111 proposes a fix |
Thanks for fix @AudreyAAMartin. |
@gaynorr is it because your devel and main branches are not in sync? |
@AudreyAAMartin thanks for pointing this out. I forgot about this when submitting to CRAN, and submitted the source package from devel that didn't include your changes made on the master. I'll look into syncing these branches. |
@AudreyAAMartin I merged the master branch into devel and that should sort out the issue. Your changes are now reflected in both branches and should go to CRAN with the next submission. I tend to do all my work on devel and submit to CRAN for there. I initiate a pull request from devel to master when I'm getting ready submit and use GitHub actions to test the package before submitting. I've been trying to approve the pull request after the package is accepted on CRAN, so that the master version reflect what's on CRAN. However, I'm not always consistent with what I do. It was my mistake for forgetting to merge your submission to devel before submitting. |
Describe the bug
The sortPed function should return a pedigree with information/column about which generation individuals are part of. In the current setting, all individuals are (wrongly) attributed gen 1.
Steps To Reproduce
#Pedigree setting
id = 1:5
mother = c(0,0,0,1,1)
father = c(0,0,2,0,3)
#creating the ped and getting the gen information
ped = sortPed(id=id, mother=mother, father=father, maxCycle=100)
Expected behavior
I would expect the founders to get a value of 1 for gen, and then the offspring to be of a later generation than their parents.
For the pedigree used as example, I would expect this output:
gen id mother father
1 1 0 0
1 2 0 0
2 3 0 2
2 4 1 0
3 5 1 3
The text was updated successfully, but these errors were encountered: