This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Heatmap with different comparisons

Hello everyone,

I want to make a heatmap of different comparisons in one, I am using deseq2 but I have only managed to make one heatmap where I see a given number of a single comparison, is it possible to make a heatmap of multiple contrasts in deseq2?

I have different treatments: T1, T2, T3 and a control (C1).

# Heatmap
# Selecting the Top 20 Differentially Expressed Genes in the Treatment_vs_Control Comparison
res_ordered <- Treatment_vs_Control[order(Treatment_vs_Control$padj), ]
top_genes <- row.names(res_ordered)[1:20]


# Normalizing Counts
counts <- counts(dds, normalized = TRUE)
counts_top <- counts[top_genes, ]

# Applying a Logarithmic Transformation to Counts
log_counts_top <- log2(counts_top + 1)


# Heatmap
heatmap <- pheatmap(log_counts_top)
deseq2 heatmap

0 answers

No answers yet.

Log in to answer this question.