Hi Peter, You didn't give a very specific example, but it seems to me that what you wish to do is not really complicated. I suppose you have created a table of sequences vs. say hyprophobicity, charge, etc..., something like... seq hydroph arom b0001 0.104762 0.000000 b0002 0.035122 0.065854 b0003 0.024193 0.070968 b0004 -0.096729 0.084112 b0005 -0.973469 0.091837 b0006 -0.402713 0.108527 b0007 0.680672 0.123950 b0008 -0.209779 0.072555 b0009 -0.013334 0.046154 b0010 0.952128 0.143617 suppose you have these data into a data frame called myseqs [see the R documentation in how to upload these data, you can try > myseqs <- edit(read.table()) ] # you need to load the necessary libraries library(mva) # basic clustering library(cluster) # more clustering algorithms # then you need to calculate the 'distances' between sequences myseqs.d <- dist(myseqs) # this creates the euclidean distance matrix, try help(dist) for more info # then we perform a hierarchical cluster myseqs.clus <- hclust(myseqs.d) # now checkout your results plot(myseqs.clus) # hey! you see how easy it is? # the documentation for hlcust contains much more info # other fancy clustering algorithms myseqs.pam <- pam(myseqs, k = 2) plot(myseqs.pam) I hope this is of any help.
I was using rgl library and it was going well, all of a sudden it
started to crash
which leads R to quit giving this error message
X Error of failed request: BadValue (integer parameter out of range for
operation)
Major opcode of failed request: 142 (XFree86-DRI)
Minor opcode of failed request: 13 ()
Value in failed request: 0x2e00067
Serial number of failed request: 705
Current serial number in output stream: 705
what is intriguing is that when I re-run R it works only for the first
time and fails
again every second time
this almost the same script I used:
step.x<-20;step.y<-20;step.z<-15
xseq <- seq(-300,300,step.x)
yseq<- seq(-300,300,step.y)
zseq <- seq(-105,105,step.z)
library(rgl)
rgl.open()
rgl.bbox(xseq,yseq,zseq,xlab=xseq,ylab=yseq,zlab=zseq,color="yellow")
min.tmp<-c(2.2,4.5,9.3)
rgl.spheres(min.tmp[1],min.tmp[2],min.tmp[3],radius=10)
and I'm using R 1.7.1 under linux red hat
any ideas what is going wrong
best regards
karim
I was using rgl library and it was going well, all of a sudden it
started to crash
which leads R to quit giving this error message
X Error of failed request: BadValue (integer parameter out of range for
operation)
Major opcode of failed request: 142 (XFree86-DRI)
Minor opcode of failed request: 13 ()
Value in failed request: 0x2e00067
Serial number of failed request: 705
Current serial number in output stream: 705
what is intriguing is that when I re-run R it works only for the first
time and fails
again every second time
this almost the same script I used:
step.x<-20;step.y<-20;step.z<-15
xseq <- seq(-300,300,step.x)
yseq<- seq(-300,300,step.y)
zseq <- seq(-105,105,step.z)
library(rgl)
rgl.open()
rgl.bbox(xseq,yseq,zseq,xlab=xseq,ylab=yseq,zlab=zseq,color="yellow")
min.tmp<-c(2.2,4.5,9.3)
rgl.spheres(min.tmp[1],min.tmp[2],min.tmp[3],radius=10)
and I'm using R 1.7.1 under linux red hat
any ideas what is going wrong
best regards
karim