Learn R Programming

MAMA (version 1.0.2)

join.results: Function to join results from meta-analysis to one list

Description

Function joins results from meta-analysis to one list. It uses predefined types of results and transform some of them.

Usage

join.results(..., type, genenames)

Arguments

...
Outputs from different function for methods of meta-analysis of microarray
type
a numeric vector idicating from which function the output is, kth element in type corresponds to kth element of ...
genenames
a character vector - names of all genes (or probe ID) included in meta-analysis = rownames of gene expression data matrix

Value

  • A list in which each slot refers to one meta-analytical method and contains a data frame with all outputs available from the method for one gene.

Details

Values below have to be used in type.
  • 1
{for functions: pvalcombination, pvalcombination.paired, EScombination or EScombination.paired} 2{for function OrderedList} 3{for function topGene} 4{for function MAP.genes} 5{for function zScores, ScoresFDR, z.stat, tspcalc} 6{for function z.stat} 7{for function tspcalc} 8{for function MAP.genes}

Examples

Run this code
## The function is currently defined as
function(...,type , genenames)
{
args<-list(...)
N<-length(args)
if (N!=length(type)) stop ("Vector type has not correct length")
results<-list()

for (i in 1:N)
{
if (type[i]==1) {results[[i]]<-metalist.to.matrix(args[[i]],genenames)}
if (type[i]==2) {dum<-as.data.frame(genenames %in% args[[i]]$intersect)
 rownames(dum)<-genenames
 results[[i]]<-dum}
if (type[i]==3) {results[[i]]<-rbind(args[[i]]$Table1, args[[i]]$Table2)}
if (type[i]==4) {results[[i]]<-probs.to.matrix(args[[i]], genenames)}
if (type[i]==5) {results[[i]]<-args[[i]]}
  }
return(results)
  }

Run the code above in your browser using DataLab