Generating heatmaps of pre-selected candidate genes after deseq2
2
2
Entering edit mode
7.1 years ago

Hi biostars, Is it possible to make a heatmap for a preselected list of genes after deseq2 DGE analysis? I wanted to represent the log2FC of 20 differentially expressed candidate genes as a heatmap.

RNA-Seq DESEq2 heatmap • 9.1k views
ADD COMMENT
0
Entering edit mode

Hi, did you solve this? I want to do a similar thing with a number of candidate genes but using rlog data to include in a pheatmap

ADD REPLY
3
Entering edit mode
7.1 years ago
e.rempel ★ 1.1k

Hi,

it is absolutely possible. Have a look at this tutorial. You could slice the matrix of normalized counts to contain only interesting genes:

pheatmap(assay(ntd)[intersting_genes,], cluster_rows=FALSE, show_rownames=FALSE,
     cluster_cols=FALSE, annotation_col=df)
ADD COMMENT
0
Entering edit mode

How do you "slice the matrix of normalized counts to contain only interesting genes", considering a list/data frame named "GENES_TO_LABEL" (containing the names of the genes you wish to label) which you've imported from a txt file?

ADD REPLY
0
Entering edit mode

Hi, did you solve this? I want to do a similar thing with a number of candidate genes but using rlog data to include in a pheatmap

ADD REPLY
0
Entering edit mode

Hi! I'm trying to do the same thing that you did but I keep getting this error: invalid subscript type 'list'. Did you solve this??

ADD REPLY
3
Entering edit mode
4.0 years ago
svp ▴ 680

You can use as follows: use a vector that contains list of genes you wish.

genes <- c("gene_1", "gene_2", ...)
mat <- assay(rld)[genes, ]
mat <- mat - rowMeans(mat)
anno <- as.data.frame(colData(rld)[c("Condition")])
pheatmap(mat, annotation_col = anno)
ADD COMMENT

Login before adding your answer.

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