Hi Guys,
I'm very new to R and bioinformatics and I hope my question isnt that stupid... I'm trying to make a Heatmap with 200 DEGs from an RNA_Seq_Dataset. In my script (which I got from another PhD candidate) I've got the following code:
topVarianceGenes <- head(order(rowVars(assay(rld)), decreasing=T),200)
matrix <- assay(rld)[topVarianceGenes,]
matrix <- matrix - rowMeans(matrix)
annotation_data <- as.data.frame(colData(rld))
pheatmap(matrix, scale = 'row',
show_rownames = T,
color = bluered(100),
fontsize = 8,
annotation_col = annotation_data[1],
cluster_cols = F) `
It works quite well, but I'm told to use the Top Genes sort by logFC and I don't find anything using google or the search function in thi forum.
Thanks to anyone who could help! :)
Hi,
Can you post the code that you've used before and print the first few lines of your data?
For instance I don't know how it looks your data, so I don't know that column names, and so on. I believe that you've used
DESeq2
for DEG, but it's not clear to me.António
From the code, it seems earlier dev used DESeq2 analysis. Please follow the manual of DEseq2 here: http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#heatmap-of-the-count-matrix
Hi,
Thank you very much, I just had to change a few things and it worked :)
Please make a note of things you changed and perhaps post that as a new answer. This comment does not help future visitors. If @caggtaagtat's answer helped you solve the problem please upvote/accept that answer.