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

Description Usage Arguments Value See Also Examples

View source: R/graph.utility.R

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 adjacency matrix.

Usage

1
2
3
4
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 containing 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 adjacency matrix of the graph (without rda extension).

net.dir

relative path to directory where the weighted adjacency 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.

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 adjacency 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(graph);
data(labels);
data(wadj);
anc <- build.ancestors(g);
tmpdir <- paste0(tempdir(),"/");
save(g, file=paste0(tmpdir,"graph.rda"));
save(L, file=paste0(tmpdir,"labels.rda"));
save(W, file=paste0(tmpdir,"wadj.rda"));
save(anc, file=paste0(tmpdir,"ancestors.rda"));
anc.dir <- net.dir <- ann.dir <- output.dir <- tmpdir;
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);

gecko515/HEMDAG documentation built on Oct. 18, 2019, 6:34 a.m.