Learn R Programming

MAMA (version 2.2.1)

MAPmatrix: Function to summarize binary matrix

Description

Function MAPmatrix summarizes a binary matrix. It treats each row as Meta-Analysis Pattern and looks for count of observed soft and strong matches.

Usage

MAPmatrix(value.dis)

Arguments

value.dis
A binary matrix with rows refering to genes and columns to microarray studies.

Value

A matrix with rows corresponding to MAP patterns and four columns: unique patterns that are being observed in the data (uniqe.pat), number of observed soft matches with the pattern (n.soft), number of observed strong matches (n.strong) and number of $1$'s in the pattern n.sig)

References

Yang, X., Bentink, S. a Spang, R., Detecting Common Gene Expression Patterns in Multiple Cancer Outcome Entities, Biomedical Microdevices, Vol.7:3, 2005

Examples

Run this code

## The function is currently defined as
function(value.dis)
{
res<-ratio(value.dis)
unique.pat <- unique(results$X.string)
n.soft <- patternMatch(value.dis,unique.pat)
n.strong <- patternMatch.strong(value.dis,unique.pat)
unique.X <- patternmatrix(unique.pat,ncol(value.dis))
n.sig <- apply(unique.X,1,sum)
mat<-data.frame(unique.pat, n.soft, n.strong,n.sig)
return(mat)
  }

Run the code above in your browser using DataLab