data frame from deseq2
1
0
Entering edit mode
7.2 years ago
1769mkc ★ 1.2k

I m plotting heatmap, based on padj value this is the code im using .

padj <- 0.05
res.index <- which(res$padj < padj)
df <- as.data.frame(
  colData(dds[res.index,])[,c("condition")])
rownames(df) <- colnames(assay(rld[res.index,]))

library(pheatmap)
pheatmap(assay(rld[res.index,]),
         cluster_rows=TRUE,
         show_rownames=FALSE, cluster_cols=TRUE,
         treeheight_col=1,
         scale="row",
         annotation_col=df)

Im getting the heatmap no issues but i want to get the value which im using for my plot , how i get that, any suggestion or help would be highly appreciated .

rna-seq R • 7.0k views
ADD COMMENT
1
Entering edit mode

Do you mean the rld normalized count table?

assay(rld[res.index,]
ADD REPLY
0
Entering edit mode

yes..how do i get that?

ADD REPLY
1
Entering edit mode
7.2 years ago
VHahaut ★ 1.2k

Ok so you mean you want to save it as a text file somewhere?

write.table(assay(rld[res.index,]), sep="\t", path, row.names=F, quote=F)

where path should be replaced by the full path where you want to save it such as:

    write.table(assay(rld[res.index,]), sep="\t", "~/Desktop/rld_normalized_count.txt", row.names=F, quote=F)
ADD COMMENT
0
Entering edit mode

thanks a lot...i was looking to get the data so that i can use it for other analysis

ADD REPLY

Login before adding your answer.

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