Learn R Programming

HEMDAG (version 2.1.3)

Do.full.annotation.matrix: Do full annotations matrix

Description

High-level function to obtain a full annotation matrix, that is a matrix in which the transitive closure of annotations was performed, respect to a given weighted adiacency matrix

Usage

Do.full.annotation.matrix(anc.file.name = anc.file.name, anc.dir = anc.dir,
  net.file = net.file, net.dir = net.dir, ann.file.name = ann.file.name,
  ann.dir = ann.dir, output.name = output.name, output.dir = output.dir)

Arguments

anc.file.name

name of the file containg the list for each node the list of all its ancestor (without rda extension)

anc.dir

relative path to directory where the ancestor file is stored

net.file

name of the file containing the weighted adjiacency matrix of the graph (without rda extension)

net.dir

relative path to directory where the weighted adjiacency matrix is stored

ann.file.name

name of the file containing the matrix of the most specific annotations (without rda extension)

ann.dir

relative path to directory where the matrix of the most specific annotation is stored

output.name

name of the output file without rda extension (without rda extension)

output.dir

relative path to directory where the output file must be stored

Value

a full annotation matrix T, that is a matrix in which the transitive closure of annotations was performed. Rows correspond to genes of the input weighted adjiacency matrix and columns to terms. \(T[i,j]=1\) means that gene \(i\) is annotated for the term \(j\), \(T[i,j]=0\) means that gene \(i\) is not annotated for the term \(j\).

See Also

full.annotation.matrix

Examples

Run this code
# NOT RUN {
data(graph);
data(labels);
data(wadj);
if (!dir.exists("data")){
	dir.create("data");
}
if (!dir.exists("results")){
	dir.create("results");
}
anc <- build.ancestors(g);
save(anc,file="data/ancestors.rda");
save(g,file="data/graph.rda");
save(L,file="data/labels.rda");
save(W,file="data/wadj.rda");
anc.dir <- net.dir <- ann.dir <- "data/";
output.dir <- "results/";
anc.file.name <- "ancestors";
net.file <- "wadj";
ann.file.name <- "labels";
output.name <- "full.ann.matrix";
Do.full.annotation.matrix(anc.file.name=anc.file.name, anc.dir=anc.dir, net.file=net.file, 
net.dir=net.dir, ann.file.name=ann.file.name, ann.dir=ann.dir, output.name=output.name, 
	output.dir=output.dir);
# }

Run the code above in your browser using DataLab