When making a heat map with normalized data, should you still see the control data?
0
0
Entering edit mode
2.1 years ago
mgranada3 ▴ 30

I am trying to create a heat map in R using the package(pheatmap). I am to do this using my normalized data for ALL genes with hierarchical clustering per 100's of genes. However, I am confused because my heat map still includes the control data. It was communicated to me that if the treatment was normalized to the control then the control data would appear as having zero expression. When I create my heat map I still see the control data. Is this right?

I have provided some of my code, I am following Analyzing RNA-Seq Data with DESEQ2

coldata <- read.csv("coldata.csv", row.names=1) 
cts <- read.csv("countmatrix.csv", row.names=1)

coldata <- coldata[,c("condition","type")]
coldata$condition <- factor(coldata$condition)
coldata$type <- factor(coldata$type)    

library("DESeq2")
dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ condition)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds <- DESeq(dds)
vsd <- vst(dds, blind=FALSE)

library("pheatmap")
select_test <- order(rowMeans(counts(dds,normalized=TRUE)), decreasing=TRUE)
df <- as.data.frame(colData(dds)[,c("condition","type")])
pheatmap(assay(vsd)[select_test,], cluster_rows=TRUE, cutree_rows=4, show_rownames=FALSE, 
              cluster_cols=FALSE, annotation_col=df)

pheatmap

RNA-seq pheat R • 2.2k views
ADD COMMENT
0
Entering edit mode

...the treatment was normalized to the control

I don't know which line in your codes did this.

To show the DEGs in heatmap, you can try set the parameter scale = "row"; or mannually calculate the log(treatment/control) values and use it as the the input matrix for pheatmap()

ADD REPLY
0
Entering edit mode

So I thought the rowMeans(counts(dds,normalized=TRUE)) is me normalizing.

I did not really understand what scale="row" did, is this sufficient normalization for publishing work?

ADD REPLY
0
Entering edit mode

According to the help page, what normalized = TRUE does is

divide the counts by the size factors or normalization factors before returning

So the control data won't "disappear".

scale = "row" means conducting z-score normalization in every row.

ADD REPLY

Login before adding your answer.

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