Entering edit mode
3.8 years ago
mahejabeen.nidhi
▴
20
I am not sure where I am making the error
#sort by log2FC
sortedbyLFC <- DESeq2resultsSTARalignment.tabular[order(-DESeq2resultsSTARalignment.tabular$log2.FC.), ]
#create dataframe
sorteddataframe <- data.frame(sortedbyLFC, row.names = "GeneID")
first5000genes <- head(sorteddataframe,5000)
first5000genes
#create heatmap
pheatmap(first5000genes)
The output is below https://imgur.com/MkYgkvo
Please see How to add images to a Biostars post to add your images properly. You need the direct link to the image, not the link to the webpage that has the image embedded (which is what you have used here)
that is not the way to draw heatmap. For the first 5000 genes, extract expression values (for each gene across samples) from the expression matrix, then plot heatmap.