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

problem with calc_genoprob if no genetic map #194

Closed
kbroman opened this issue Mar 4, 2021 · 0 comments
Closed

problem with calc_genoprob if no genetic map #194

kbroman opened this issue Mar 4, 2021 · 0 comments
Labels

Comments

@kbroman
Copy link
Member

kbroman commented Mar 4, 2021

A problem reported on the R/qtl2 google group: if one doesn't have a genetic map and uses insert_pseudomarkers() to create one, for example using the physical map, then the output of calc_genoprob() ends up not having chromosome names, which leads to errors when trying to call calc_kinship().

Here's an example:

iron <- read_cross2(system.file("extdata", "iron.zip", package="qtl2"))            
gmap <- iron$gmap                                
iron$gmap <- NULL
pr <- calc_genoprob(iron, gmap)

names(pr)
# NULL

k <- calc_kinship(pr)
#  Error in probs[[1]] : subscript out of bounds

names(pr) <- names(gmap)
k <- calc_kinship(pr) # this now works
@kbroman kbroman added the bug label Mar 4, 2021
@kbroman kbroman changed the title problem with calc_genoprob if no gmap problem with calc_genoprob if no genetic map Mar 4, 2021
kbroman added a commit to kbroman/qtl2 that referenced this issue Mar 4, 2021
@kbroman kbroman closed this as completed Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant