Question: How can I get DESeq2 heatmap result in tabular format?
0
gravatar for Kurban
2.4 years ago by
Kurban170
china/Urumqi/xinjiang academy of animal scinces
Kurban170 wrote:

Hello guy, I have use DEseq2 got the heat map based on unigenes’ readcounts. The command lines I have used are:

colData <- read.table("colData.txt") countData <- read.table("countData_DEGs(count_larger_1).txt")

rownames(colData) <- sub("fb","",rownames(colData)) all(rownames(colData) %in% colnames(countData))

countData <- countData[, rownames(colData)] all(rownames(colData) == colnames(countData))

dds <- DESeqDataSetFromMatrix(countData = countData, colData = colData, design =~ condition)

pheatmap(log2.norm.counts, cluster_rows=TRUE, show_rownames=FALSE, cluster_cols=TRUE, annotation_col=df)

dev.print(pdf, 'countData_DEGs(count_larger_1_heatmap_include_cluster.pdf')

But I want to know detailed information like which unigenes clustered together. And if I could get this cluster result in tabular format would be great. How can I do that? I am very new at R language. any suggestion would be appreciated.

rna-seq • 1.1k views
ADD COMMENTlink modified 2.4 years ago by e.rempel770 • written 2.4 years ago by Kurban170
0
gravatar for e.rempel
2.4 years ago by
e.rempel770
Germany, Heidelberg, COS
e.rempel770 wrote:

Hi Kurban,

first you can save pheatmap as an object:

cluster.object <- pheatmap(log2.norm.counts, cluster_rows=TRUE, show_rownames=FALSE, cluster_cols=TRUE, annotation_col=df)

Then you can inspect the hierarchical tree of cluster results by

cutree(cluster.object$tree_col, number_of_clusters)

assuming that your genes are in columns. The variable number_of_clusters has to be set by you.

ADD COMMENTlink written 2.4 years ago by e.rempel770

hi @e.rempel,

could not cut the tree, and reported this error:

cutree(cluster.object$tree_col,60) Error in cutree(cluster.object$tree_col, 60) : invalid 'tree' ('merge' component)

ADD REPLYlink modified 2.4 years ago • written 2.4 years ago by Kurban170

Hi Kurban,

the error message implies that there is something wrong with cluster.object$tree_col: an object of class hclust. Can you have a look at cluster.object$tree_col$merge?

ADD REPLYlink written 2.3 years ago by e.rempel770
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: 628 users visited in the last hour