heatmap using DESeq2
3
1
Entering edit mode
7.5 years ago

I am trying to generate a heat map of the top differentially expressed genes between two samples. I have used DESeq2 to identify these. My code is

library(DESeq2)

countData = read.csv("data.txt",header = T,sep = "\t")

colData = DataFrame(condition = factor(c("female","female","female","male","male","male")))

dds <- DESeqDataSetFromMatrix(countData = countData,colData = colData,design = ~ condition)

dds <- dds[ rowSums(counts(dds)) > 1, ]

dds <- DESeq(dds)

res <- results(dds,contrast=c("condition","male","female"))

summary(res)

I am not sure how to get a heatmap from the dds or res objects. Please help. Thanks

RNA-Seq • 7.0k views
ADD COMMENT
0
Entering edit mode

This guideline contains code for making DESeq2 heatmaps, and also the DESeq2 manual does. Using google to find this wasn't too hard!

ADD REPLY
2
Entering edit mode
7.5 years ago

Please visit "Data quality assessment by sample clustering and visualization" section in below page: https://www.bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html

ADD COMMENT
0
Entering edit mode
7.5 years ago
Kritika ▴ 270

You can extract FPKM values or Count value (If you are using htseq-count) of top differentially expressed gene. by this FPKM matrix you can plot heatmap using pheatmap library or heatmap.2(ggplot lib).

ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode
7.5 years ago
BioinfGuru ★ 2.1k

Create a matrix of DEG counts then use corrplot or ggplot2.

Matrix example:

                  sample1        sample2        sample3 
sample1              0             567            545                
sample2             123             0             234
sample3             345            34              0

Corrplot is very very very easy. ggplot2 gives more control but is more complicated and will require first converting the matrix to long format using the melt function of reshape package. Did I mention how easy corrplot is?

ADD COMMENT

Login before adding your answer.

Traffic: 1617 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