/usr/lib/R/site-library/graph/Scripts/distGraph.R is in r-bioc-graph 1.56.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | ##some code for distGraphs
## a concrete example:
library(Biobase)
library(mva)
setwd("c:/cygwin/home/rgentlem/Software/graph/R")
source("clustergraph.R")
data(eset)
d1 <- dist(exprs(eset))
length(d1)
##should be 124750
##500*499/2
## 124750
## we could take deciles and
deciles <- quantile(unclass(d1), probs=seq(0.1,0.9,0.1))
dG <- new("distGraph", Dist=d1)
dG2 <- threshold(dG, deciles[8])
dG3 <- threshold(dG, deciles[4])
xx<- d1[1:10, c(3,5,11)]
ad1 <- adj(dG3, 10)
ac1 <- acc(dG3, 10)
cc <- connComp(dG3)
dG4 <- threshold(dG, deciles[1]/2.1)
cc4 <- connComp(dG4)
J<- sapply(cc4, function(x) length(x))
table(J)
|