How to create a sample-distance heatmap using DESeq2 package?
0
0
Entering edit mode
4.1 years ago
Aynur ▴ 60

Hello, I am doing differential gene expression analysis using DESeq2. I want to make an expression heat map of sample-to-sample distances on the matrix of variance-stabilized data(rlog). I followed this code.

rld <- rlog(Merged_dds, blind=TRUE)
rld_mat <- assay(rld)
rld_cor <- cor(rld_mat)
pheatmap(rld_cor, annotation = select(Merged_metadata, condition))
heat.colors <- brewer.pal(6, "Blues")

I got a heatmap for all samples(10 samples, with 4 different treatments, and one control). Each condition has 2 biological replicates. But I want to make a similar heatmap for only one condition vs control. I have 2 replicates for each condition. When I tried to use the same code for it, I did not get any error, but I also did not get the heatmap. So, my question is can I make a distance heatmap for 4 samples- 2 being one condition, other 2 being controls or not? If, yes, how should I change the code? Given I will use the correct data.

Thank you for reading my post. I hope to get your help.

Best wishes,

R rna-seq next-gen • 1.6k views
ADD COMMENT
1
Entering edit mode

Select rld_cor for the samples you want. Standard rules of matrix subsetting in R apply.

ADD REPLY

Login before adding your answer.

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