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

Missing Parental Data #21

Open
dcgerard opened this issue Mar 25, 2022 · 0 comments
Open

Missing Parental Data #21

dcgerard opened this issue Mar 25, 2022 · 0 comments

Comments

@dcgerard
Copy link
Owner

I should allow parental data to be encoded as missing with NA rather than only accepting 0 counts.

Generate data

library(updog)
nsamp <- 191
genovec <- rgeno(n = nsamp, ploidy = 4, model = "f1", p1geno = 2, p2geno = 2)
sizevec <- rep(6, nsamp)
refvec <- rflexdog(sizevec = sizevec, 
                   geno = genovec, 
                   ploidy = 4, 
                   seq = 0.001, 
                   bias = 1, 
                   od = 0.001)

Errors if you give it NA

fout <- flexdog(refvec = refvec, 
                sizevec = sizevec, 
                ploidy = 4, 
                model = "f1",
                p1ref = NA, 
                p1size = NA)

OK if you have 0 ref and 0 size.

fout <- flexdog(refvec = refvec, 
                sizevec = sizevec, 
                ploidy = 4, 
                model = "f1",
                p1ref = 0, 
                p1size = 0)
plot(fout)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant