# Computation of scores using STRING data with respect to
# the FunCat category 11.02.01 rRNA synthesis
library(bionetdata);
data(Yeast.STRING.data);
data(Yeast.STRING.FunCat);
labels <- Yeast.STRING.FunCat[,"11.02.01"];
n <- length(labels);
ind.pos <- which(labels==1);
# NN-scores computed directly on the STRING matrix
s <- NN.w.score(Yeast.STRING.data, 1:n, ind.pos, w=labels);
# Weighted NN-scores computed directly on the STRING matrix
# using this time random weights for the value of positive nodes
w <- runif(n);
s <- NN.w.score(Yeast.STRING.data, 1:n, ind.pos, w=w);
# \donttest{
# Weighted NN-scores computed on the 1 step and 2-step random walk kernel matrix
K <- rw.kernel(Yeast.STRING.data);
sK <- NN.w.score(K, 1:n, ind.pos, w);
K2 <- p.step.rw.kernel(K, p=2);
sK2 <- NN.w.score(K2, 1:n, ind.pos, w);
# }
Run the code above in your browser using DataLab