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 plotting scan1snps results when keep_all_snps=FALSE #89

Closed
kbroman opened this issue Dec 6, 2018 · 0 comments
Closed

problem plotting scan1snps results when keep_all_snps=FALSE #89

kbroman opened this issue Dec 6, 2018 · 0 comments
Labels

Comments

@kbroman
Copy link
Member

kbroman commented Dec 6, 2018

Was working with the Arabidopsis MAGIC data and trying to create SNP info from available founder snps, and ran into an error when plotting the results of scan1snps().
Basic set up of data:

file <- paste0("https://raw.githubusercontent.com/rqtl/",
               "qtl2data/master/ArabMAGIC/arabmagic_tair8.zip")
arab <- read_cross2(file)

gmap <- insert_pseudomarkers(arab$gmap, step=1)
pmap <- interp_map(gmap, arab$gmap, arab$pmap)

pr <- calc_genoprob(arab, gmap, error_prob=0.002, cores=0)

Prepare snp info:

library(qtl2convert)

snpinfo <- map_list_to_df(arab$pmap, marker="snp")
fg <- do.call("cbind", arab$founder_geno)
sdp <- calc_sdp(t(fg))

snpinfo <- cbind(snpinfo[names(sdp),], sdp)
snpinfo <- index_snps(pmap, snpinfo)

This works:

out_snps <- scan1snps(pr, pmap, arab$pheno, snpinfo=snpinfo, keep_all_snps=TRUE)
plot(out_snps$lod, out_snps$snpinfo)

But this gives an error:

out_snps <- scan1snps(pr, pmap, arab$pheno, snpinfo=snpinfo)
plot(out_snps$lod, out_snps$snpinfo)

But it seems that this works fine:

out_snps <- scan1snps(pr, pmap, arab$pheno, snpinfo=snpinfo)
plot(out_snps$lod, snpinfo)
@kbroman kbroman added the bug label Dec 6, 2018
kbroman added a commit that referenced this issue Mar 8, 2019
Fix issue #89 re keep_all_snps=FALSE in scan1snps()
@kbroman kbroman closed this as completed Mar 8, 2019
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