How To Find The Distance Between Genes After Performing A Clustering
2
0
Entering edit mode
7.7 years ago

Hi i have a query regarding clustering,I have clustered my genes using amap package of top 50 genes but how can i find out the distances between these genes depending upon their expression values.I have used this R script:

library(amap)
clust.genes<-hcluster(x=dat.s,method="euclidean",link="average")
clust.arrays<-hcluster(x=t(dat.s),method="euclidean",link="average")

n<-1:nrow(dat.s)
n.s<-sample(n, nrow(dat.s)*0.1)
dat.sample<-dat.s[n.s,]
library(amap)

clust.genes<-hcluster(x=dat.sample, method="euclidean",link="average")
clust.arrays<-hcluster(x=t(dat.sample), method="euclidean",link="average")
plot(clust.genes)
clustering • 2.0k views
ADD COMMENT
1
Entering edit mode
7.5 years ago

What do you mean by the distance between genes? The distance between them is the same before or after clustering, unless you use a measure of distance between clusters!

If you want the distance between genes, simply compute it with the desired measure... their distance is not going to change after clustering...

Can you be a bit clearer about your question?

ADD COMMENT
0
Entering edit mode
7.5 years ago
Ahill ★ 1.9k

The R dist() function returns the distance matrix computed by using a specified distance measure. Type ?dist at the R prompt for details. For your dat.sample matrix:

dist.genes <- dist(dat.sample, method="euclidean")
dist.arrays <- dist(t(dat.sample), method="euclidean")
ADD COMMENT

Login before adding your answer.

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