overlay QTL plots

179 views
Skip to first unread message

Mingzi Xu

unread,
Oct 3, 2017, 10:33:26 AM10/3/17
to R/qtl discussion
Dear all,

I would like to show both interval mapping and multiple QTL mapping figures in a paper. With many families, if I show each in separate figures, that would result in many figures. I'm wondering if there is a way to overlay multiple QTL mapping LOD profile on top of certain chromosomes in interval mapping in R/qtl or other softwares, given that not all chromosomes have a significant peak in the multiple QTL model. I tried simply cut and paste and visually align the markers. The result isn't very visually appealing because one figure has to be stretched or squeezed. 

Many thanks!

Mingzi

Karl Broman

unread,
Oct 4, 2017, 11:35:48 AM10/4/17
to rqtl...@googlegroups.com
You should be able to overlay the single-QTL scan by using plot() with add=TRUE.
Here's an example.

data(hyper)
hyper <- calc.genoprob(hyper, step=1)
out <- scanone(hyper)
qtl <- makeqtl(hyper, chr=c(1,4), pos=c(48.3, 29.5), what="prob")
qtl <- refineqtl(hyper, qtl=qtl, method="hk")

# just show chr 1 and 4
plotLodProfile(qtl)
plot(out, chr=c(1,4), add=TRUE, col="gray")

# show all chromosomes
plotLodProfile(qtl, showallchr=TRUE)
plot(out, add=TRUE, col="gray")

karl
> --
> You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
> To post to this group, send email to rqtl...@googlegroups.com.
> Visit this group at https://groups.google.com/group/rqtl-disc.
> For more options, visit https://groups.google.com/d/optout.

Mingzi Xu

unread,
Oct 4, 2017, 4:19:04 PM10/4/17
to R/qtl discussion
Thank you so much! This is exactly what I'm looking for!

bmu...@ncsu.edu

unread,
Oct 15, 2017, 11:34:04 PM10/15/17
to R/qtl discussion
Hi,

I have a similar question. but with the function plot(qtl). I have 2 set of qtl derived from different models and I would like to show both with different colors on the same map. I tried the add fuction but did not worked, 
> plot(qtl.122, col="blue")
> plot(qtl.121, add=TRUE, col="red")


How can I overlay both sets?

Thank you,

Karl Broman

unread,
Oct 16, 2017, 12:16:03 AM10/16/17
to rqtl...@googlegroups.com
There's not a simple way to do this at present, unfortunately.

But you could combine the two QTL into one object and then use a vector of colors.

qtl_combined <- qtl.122
for(i in 1:nqtl(qtl.121)) {
qtl_combined <- addtoqtl( mycross, qtl_combined, qtl.121$chr[i], qtl.121$pos[i], qtl.121$name[i] )
qtl_combined$altname[nqtl(qtl_combined)] <- qtl.121$altname[i]
}

plot(qtl_combined, col=rep(c("blue", "red"), c(nqtl(qtl.122), nqtl(qtl.121)))

karl

bmu...@ncsu.edu

unread,
Oct 16, 2017, 3:04:58 PM10/16/17
to R/qtl discussion
thank you very much

Bryan

John Lovell

unread,
Oct 18, 2017, 12:08:51 PM10/18/17
to R/qtl discussion
Reply all
Reply to author
Forward
0 new messages