pathClass (version 0.9.4)

matchMatrices: Matches the expression data to the adjacency matrix using the provided mapping.

Description

Usually the dimension of the graph and the expression data do not fit to each other. Additionally most often the graph comprises another type of knowledge, i.e. the expression matrix measures 10.000 genes represented as 15.000 probe sets and the graph provides information on 7.000 proteins. Thus, a node (protein) of the graph might match to two probe sets in the expression matrix (since both target the gene encoding the protein). Therefore, this method uses the relationship between probe sets and i.e. proteins which is encoded in the mapping to create a graph of probe sets rather then a graph of proteins.

Usage

matchMatrices(x, mapping, adjacency)

Arguments

x
the p x n expression matrix with p patients and n genes.
mapping
a mapping which encodes the relationship between the colnames of x and the row/colnames of the adjacency matrix.
adjacency
the adjacencymatrix of the underlying graph structure.

Value

the matched input
x
the expression matrix containing only the features which are also present in the adjacency matrix
mapping
the mapping containing only necessary information
adjacency
the adjacency matrix with the same number of nodes as features in x

Examples

Run this code
## Not run: 
# library(Biobase)
# data(sample.ExpressionSet)
# x <- t(exprs(sample.ExpressionSet))
# y <- factor(pData(sample.ExpressionSet)$sex)
# # create the mapping
# library('hgu95av2.db')
# mapped.probes <- mappedkeys(hgu95av2REFSEQ)
# refseq <- as.list(hgu95av2REFSEQ[mapped.probes])
# times <- sapply(refseq, length)
# mapping <- data.frame(probesetID=rep(names(refseq), times=times), graphID=unlist(refseq), 
# row.names=NULL, stringsAsFactors=FALSE)
# mapping <- unique(mapping)
# library(pathClass)
# data(adjacency.matrix)
# matched <- matchMatrices(x=x, adjacency=adjacency.matrix, mapping=mapping)
# ## End(Not run)

Run the code above in your browser using DataLab