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

besthint not working #23

Open
LouisLeNezet opened this issue May 30, 2023 · 0 comments
Open

besthint not working #23

LouisLeNezet opened this issue May 30, 2023 · 0 comments

Comments

@LouisLeNezet
Copy link
Contributor

Hi,

Here is an issue regarding the besthint function.
Using the following example:

  data(sample.ped)
  ped <- with(sample.ped, pedigree(id, father, mother, sex))
  besthint(ped, wt = c(100, 10, 1), tolerance = 100)

Doesn't work due to missing momid and dadid.
By modifying the besthint with:

    momid <- unique(ped$id[ped$mindex[ped$mindex!=0]])
    dadid <- unique(ped$id[ped$findex[ped$findex!=0]])
    mom <- match(momid, ped$id)
    dad <- match(ped$id, dadid)
    founders <- ped$id[ped$mindex == 0 & ped$findex == 0]  #founders and marry-ins
    fpair <-  !(is.na(match(momid, founders)) |
                is.na(match(dadid, founders)))
    fmom  <- unique(match(momid[fpair], ped$id)) #row num of founding moms

This works until autohint where it broke:
The problem seems to come from the hint random generation:

hint <-cbind(1:n, rep(0,n))

Could you fix the issue ?

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

1 participant