Last data update: 2014.03.03

R: Merge gene expression data sets
mergeExprsR Documentation

Merge gene expression data sets

Description

Merges gene expression data from different studies.

Usage

   mergeExprs(...)

Arguments

...

Input objects can be any combination of mergeExpressionSet, ExpressionSet, matrix or a list. A list should have the following slots: expression matrix, pheno data matrix, gene names vector, notes. The order of the four slots is fixed. A matrix should have genes ids as its row names, as should the exprs slot of an ExpressionSet. Since merging depends on geneids, these conventions are essential.

Details

The mergeExpressionSet object is the standard input for all functions in the MergeMaid package. Use the mergeExprs function when creating mergeExpressionSet objects to ensure that all necessary information is available for further analysis.

Value

The output is a mergeExpressionSet.

See Also

mergeExpressionSet-class

Examples

  if(require(Biobase) & require(MASS)){
  data(mergeData)
  merged  <-mergeExprs(sample1,sample2,sample3)

  rr<-rnorm(200*22,0,1)
  mm<-matrix(rr,200,22)
  rownames(mm)<-sample2[[3]]
  merge.m<-mergeExprs(sample1,mm,sample2)
  intcor.m<-intCor(merge.m)
  plot(merge.m)

  rr<-rnorm(200*50,0,1)
  mm2<-matrix(rr,200,50)
  ph.ll<-as.data.frame(rbinom(50,1,.5))
  ll<-list(mm2,ph.ll,sample2[[3]],"list 2")
  merge.t<-mergeExprs(sample1,mm,sample2,ll)
  intcor.t<-intCor(merge.t)
  plot(merge.t)

  merge.a<-mergeExprs(sample3,merge.m,ll)
  inter<-intersection(merge.a)
  summary(merge.a)
  }

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MergeMaid)
Loading required package: survival
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: MASS
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/MergeMaid/mergeExprs.Rd_%03d_medium.png", width=480, height=480)
> ### Name: mergeExprs
> ### Title: Merge gene expression data sets
> ### Aliases: mergeExprs AverageDuplicates check mergeget
> ### Keywords: manip
> 
> ### ** Examples
> 
>   if(require(Biobase) & require(MASS)){
+   data(mergeData)
+   merged  <-mergeExprs(sample1,sample2,sample3)
+ 
+   rr<-rnorm(200*22,0,1)
+   mm<-matrix(rr,200,22)
+   rownames(mm)<-sample2[[3]]
+   merge.m<-mergeExprs(sample1,mm,sample2)
+   intcor.m<-intCor(merge.m)
+   plot(merge.m)
+ 
+   rr<-rnorm(200*50,0,1)
+   mm2<-matrix(rr,200,50)
+   ph.ll<-as.data.frame(rbinom(50,1,.5))
+   ll<-list(mm2,ph.ll,sample2[[3]],"list 2")
+   merge.t<-mergeExprs(sample1,mm,sample2,ll)
+   intcor.t<-intCor(merge.t)
+   plot(merge.t)
+ 
+   merge.a<-mergeExprs(sample3,merge.m,ll)
+   inter<-intersection(merge.a)
+   summary(merge.a)
+   }
$`Number of Genes in Each Study`
     [,1]      [,2]      [,3]  [,4]      [,5] 
[1,] "sample3" "sample1" "mm"  "sample2" "ll" 
[2,] "500"     "100"     "200" "200"     "200"

$`Number of Samples in Each Study`
     [,1]      [,2]      [,3] [,4]      [,5]
[1,] "sample3" "sample1" "mm" "sample2" "ll"
[2,] "70"      "100"     "22" "50"      "50"

$Notes
[1] "study 1" "study 2" "study 3" "study 4" "study 5"

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>