Question: How to create a sample-distance heatmap using DESeq2 package?
0
gravatar for Aynur
3 months ago by
Aynur40
Aynur40 wrote:

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,

rna-seq next-gen R • 218 views
ADD COMMENTlink modified 3 months ago by ATpoint44k • written 3 months ago by Aynur40
1

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

ADD REPLYlink written 3 months ago by ATpoint44k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1432 users visited in the last hour
_