Chromosome wise heat-map using p-values
1
1
Entering edit mode
8.3 years ago

Dear All,

I have marker data with each marker having specific p-value, now I would like to plot a heat map using these p-values like the following link: http://www.fcg.ethz.ch/research/GenomicResources/a-transcriptome-map-of-perennial-ryegrass.html

Can anyone suggest an R package or any other way to construct chromosome wise heatmaps?

Thanks in advance

snp R genome RNA-Seq • 3.4k views
ADD COMMENT
0
Entering edit mode

use simple R plot function called 'image' and use par(mfrow=c(1,2))

image(YOUR_DATA1(Chr1),col = brewer.pal(3, "Greens"))
image(YOUR_DATA2(Chr2),col = brewer.pal(3, "Greens"))

In the below image, I used 'image' (middle bar). I guess you are looking for similar bars. You can also use 'breaks' as in 'heatmap' function.

Use looping function in R to plot for multiple bars for all chromosomes.

ADD REPLY
0
Entering edit mode

Hi

this really sounds promising but can you break down the code please? I'm really new to R, I'm trying to use image function but it gives me error, image function is for matrix data type but I have to plot as a single bar, could you explain how it was done??? cheers

ADD REPLY
1
Entering edit mode

The trick is try to use column names with cbind function.

image(cbind(YOUR_DATA$Chr1),col = brewer.pal(3, "Greens"))

First try to plot for single chromosome (one bar). Check if it works, then go for multiple plots.

ADD REPLY
0
Entering edit mode
8.3 years ago

One simple option could be to create bigwig files where the score column is your p-value data, or probably better -log10(p-value). Then load this files in IGV and display as heatmap (see https://www.broadinstitute.org/igv/ChangeDataDisplay). For more advanced tweaking I would use R, maybe there are packages designed for this job.

ADD COMMENT

Login before adding your answer.

Traffic: 2572 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6