More appealing plot outputs

14 views
Skip to first unread message

benc...@gmail.com

unread,
Apr 13, 2021, 1:52:49 PMApr 13
to R/qtl discussion
Hello, I am trying to make more appealing figures from my results with r/qtl. I like how the plots look in qtlcharts but not sure how to export them since they are interactive plots.  Is there a way in R/qtl I can generate this kind of plot output with the threshold line or other customizations?

Also, if anyone has suggestions for how to make nicer figures from the R/qtl results please let me know!

I attached a screenshot of the output from iplotScanone
Capture.PNG

Karl Broman

unread,
Apr 13, 2021, 2:42:23 PMApr 13
to R/qtl discussion
You can use the arguments bgrect and bandcol to change the background colors, and col to change the color of the lines.
But for much further customization, you may have to edit the function. To save the function to a file use dput(qtl:::plot.scanone, "my_plot_scanone.R")

  data(hyper)
  hyper <- calc.genoprob(hyper, step=1)
  out <- scanone(hyper)
  plot(out, bandcol="gray80", bgrect="gray90", col="darkslateblue") 

Note also that there's a function add_threshold for adding a LOD threshold.

karl

Ben

unread,
Apr 13, 2021, 2:55:14 PMApr 13
to rqtl...@googlegroups.com
I see, thanks for your fast reply!

--
You received this message because you are subscribed to a topic in the Google Groups "R/qtl discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rqtl-disc/Fg2dt043kYE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rqtl-disc+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rqtl-disc/aadf89b0-7378-4930-9a50-3a91b51e4d28n%40googlegroups.com.

Karl Broman

unread,
Apr 13, 2021, 3:10:36 PMApr 13
to R/qtl discussion
Another option is to use the plotting function from R/qtl2.

  library(qtl)
  data(hyper)
  hyper <- calc.genoprob(hyper, step=1)
  out <- scanone(hyper)

  library(qtl2)
  library(qtl2convert)
  out2 <- scan_qtl_to_qtl2(out)
  plot(out2$scan1, out2$map)

karl
Reply all
Reply to author
Forward
0 new messages