Learn R Programming

EGAD (version 1.0.3)

make_annotations: Creating gene annotations

Description

The function annotates a list of genes according to a given ontology. It creates a binary matrix associating genes (rows) with labels (columns).

Usage

make_annotations(data, listA, listB)

Arguments

data
2-column matrix, each row a pair indicating a relationship or interaction
listA
string array of genes
listB
string array of labels/functions

Value

net matrix binary

Examples

Run this code
gene.list <- paste('gene', 1:100, sep='')
labels.list <- paste('labels', 1:10, sep='')
data <- matrix(0,nrow=100, ncol=2)
data[,1] <- sample(gene.list, 100, replace=TRUE)
data[,2] <- sample(labels.list, 100, replace=TRUE)
net <- make_annotations(data, gene.list, labels.list)
  
 

Run the code above in your browser using DataLab