This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Distance matrix plot issue

This is my code which i m using to create a distance matrix from my expression value

gendat = read.csv('PRIMARY_CELL_UBI (copy).csv',row.names = 1)
gen <- t(gendat)

dd <- as.dist((1 - cor(gen, method='spearman')/2))
View(dd)

I would like to plot something like this since my expression data consist of two condition compared with normal

I would like to plot something like this since my expression data consist of two condition compared with normal Im not sure if i can pass the data and plot is a heatmap or how do i proceed ?

I would like to get the cluster of genes that is formed when i make the distance matrix

Any suggestion or help would be highly appreciated

r

Google for R heatmap.

yes i create heatmap using pheatmap ,gplot etc .But i never did a distance matrix and used that to plot heatmap.But i would be glad if you could suggest me something more to my code....

1 answer

Going through the examples for heatmap.2 should enable you to do what you want.

I solved it thanks for the info

If this answer helped you solve your question then consider "accepting" it (green check mark). That provides closure to this thread.

Perhaps you can post your own answer to your question for the next person who has the same issue.

Log in to answer this question.