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

Additive effect heatmap #54

Open
jcberny opened this issue Apr 14, 2017 · 3 comments
Open

Additive effect heatmap #54

jcberny opened this issue Apr 14, 2017 · 3 comments

Comments

@jcberny
Copy link

jcberny commented Apr 14, 2017

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.

additiveheatmap

@DannyArends
Copy link
Contributor

DannyArends commented Apr 17, 2017

The mqmplot.heatmap function does more or less what you want. if you use the mqmscan function with model="additive" and then plot the results using the mqmplot.heatmap function you get an image very similar to what you want. it also allows you to create a directed heatmap.

You might want to adjust the code of the function to be more generic, or to use different colors/breaks for significance.

Gr,
Danny

@jcberny
Copy link
Author

jcberny commented Apr 17, 2017

Hi Danny,

Thanks. But it's heatmapping the LOD score or not the additive effect?

With regards,

Jorge

@DannyArends
Copy link
Contributor

DannyArends commented Apr 18, 2017

Hey Jorge,

It is indeed showing the LOD scores for the additive effects (use model="dominance" for LOD scores of the dominance component)

I don't really understand how you want to make that into a generic function, since the scale and units of the additive effect of each phenotype can be quite different. e.g. imagine mapping phenotypes on horses, a 1 cm difference in leg length on a marker can be insignificant, but a 1 cm change in ear length can be a huge difference. Both of these differences are equal and would show with the same color on the heat map, while in the one case there would be a significant different, while in the other case there would not be.

The other issue is with units, e.g. a phenotype measured in meters the other one in cubic meters, how do we plot both of these in an equal way.

If you know your phenotypes have similar units and scale you can make this function of course, but it would only be useful in a number of circumstances. and even then the same difference in phenotype (think 1cm) could be significant in one situation, while not being significant in the other (based on the variance in a phenotype)

I think just plotting the LOD scores is much more informative, see the example attached where the phenotypes have a huge range difference

    library(qtl)
    data(multitrait)
    multitrait <- fill.geno(multitrait) # impute missing genotype data
    result <- mqmscanall(multitrait, logtransform=TRUE, model="additive")
    res <- NULL
    for(x in 1:24){
      res <- cbind(res, effectscan(sim.geno(multitrait), pheno.col=x)[,3])
    }
    op <- par(mfrow = c(2,1),mar=c(1,10,1,1))
    mqmplot.heatmap(multitrait,result)
    image(res, yaxt="n")
    axis(2, at=1:24/24, colnames(pull.pheno(multitrait)), las=2)

image

here we see 24 phenotypes, from the LOD scores (top) it is clear some phenotypes have a QTL on chromosome 5, some have a QTL on chromosome 1, from the the additive effect plot (bottom) it is not clear at all since there is one phenotype dominating the plot.

Anyway, feel free to adjust the code used to produce the output you want

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants