Open pbreheny opened 5 years ago
Hi @pbreheny,
Unfortunately this is currently not possible but I would be happy to implement it. I was thinking about a "rotated" heatmap instead of those lines. What is the data format in which you store the LD, is it a matrix
or sparse version of it?
I typically use the ld()
function in the snpStats
package to compute linkage disequilibrium. It has a depth
argument that controls the maximum lag between SNPs, and returns a sparse matrix (specifically, a dgCMatrix
) with zeros for all pairs outside depth
.
A rotated heatmap would be fantastic, especially if it incorporates that sparsity/depth. For example, in the above figure, you probably wouldn't want a heatmap of the entire region, but a heatmap of the central band, rotated, would be great. I think the main appeal of the lines is that it's easy to restrict them to a certain depth, but if you can accomplish that with a heatmap, even better.
Is there a way in
Gviz
to include anything like a plot of which SNPs are in pairwise LD with each other? Something like this, for example:I haven't managed to figure out a way to include something like this, but it would be a nice addition.
Gviz
is fantastic, by the way; thank you for all your work on it.