Distance matrix plot issue
1
0
Entering edit mode
7.4 years ago
1769mkc ★ 1.2k

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 • 3.9k views
ADD COMMENT
1
Entering edit mode

Google for R heatmap.

ADD REPLY
0
Entering edit mode

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....

ADD REPLY
1
Entering edit mode
7.3 years ago
Joseph Hughes ★ 3.0k

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

ADD COMMENT
0
Entering edit mode

I solved it thanks for the info

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

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