kbroman / qtl

R/qtl: A QTL mapping environment
https://rqtl.org
GNU General Public License v3.0
77 stars 45 forks source link

Directed mqmplot.multitrait? #53

Closed jcberny closed 7 years ago

jcberny commented 7 years ago

Hi Karl, Would it be possible to develop a plot for a multi-trait directed plot?

kbroman commented 7 years ago

I'm not sure what you mean. Maybe @DannyArends has a suggestion?

jcberny commented 7 years ago

Hi Karl and Danny, On the mqmplot.multitrait(x, type="lines") the plot is unidirectional. The sign of the effect of the QTL of the reference pattern is not taken into account. For single traits one can use mqmplot.directedqtl to get the direction. I was wondering if the in the mqmplot.multitrait a directedqtl option could be added. That would be useful when analyzing the same trait in different environments for visualizing changes in direction.

DannyArends commented 7 years ago

Dear all,

The code could support plotting directional QTL values. The only thing is that I forced the yaxis from 0 to the maximum.

A minor change in the function code is enough to also allow for negative QTL values, I used the effectscan function to get the direction of QTL effect. and since I am using mqm in the example I need to get rid of the pseudo markers as well.

Hope that with this example you can created your plot

updated function + example.txt

DannyArends commented 7 years ago

oww just for clarity: you need to first load R/qtl:

library(qtl)

After this copy-paste in the example code, to overwrite the mqmplot.multitrait function in R/qtl

Gr, Danny

example output

jcberny commented 7 years ago

Thanks!

jcberny commented 7 years ago

Hi Danny and Karl,

Sorry to bother you again. I would like to plot a heatmap of the additive effects. Similar to the output in genstat (attached). It's useful to see differences in effects between environments and traits Would you have any suggestion? I think it would be a good addition to the chart package.

Thanks again for your help.

screen shot 2017-04-13 at 8 18 46 pm

kbroman commented 7 years ago

@jcberny Could you make this a separate issue? I agree this could be a useful tool.