mergeMCMC: Merge multiple MCMCout datasets preparing for cross-species...

Description Usage Arguments Value Examples

View source: R/mergeMCMC.R

Description

Merge multiple MCMCout datasets The mergeMCMC is function to merge multiple MCMCout datasets by matching orthologs

Usage

1
2
mergeMCMC(mcmc.list, species, ortholog.db, ortholog.file = NULL,
  reference = 1)

Arguments

mcmc.list:

a list of MCMC output matrices.

species:

a vector specie names of same length as mcmc.list.

ortholog.db:

the ortholog object (in R environment)

ortholog.file:

the ortholog file to be imported

reference:

the index of the reference data, the outputted merged list will be named using the rownames of this data.

Value

an merged list of multiple MCMCout datasets (with same number of rows and rownames)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
## Not run: 
data(hb)
summaryDE <- indDE(data=data,group=as.factor(group),data.type="microarray",
                  case.label="2", ctrl.label="1")
hb_pData <- summaryDE[,c(3,1)]
hb_MCMCout <- bayes(hb_pData, seed=12345)
data(hs)
summaryDE <- indDE(data=data,group=as.factor(group),data.type="microarray",
                  case.label="2", ctrl.label="1")
hs_pData <- summaryDE[,c(3,1)]
hs_MCMCout <- bayes(hs_pData, seed=12345)
data(ht)
summaryDE <- indDE(data=data,group=as.factor(group),data.type="microarray",
                  case.label="2", ctrl.label="1")
ht_pData <- summaryDE[,c(3,1)]
ht_MCMCout <- bayes(ht_pData, seed=12345)
data(mb)
summaryDE <- indDE(data=data,group=as.factor(group),data.type="microarray",
                  case.label="2", ctrl.label="1")
mb_pData <- summaryDE[,c(3,1)]
mb_MCMCout <- bayes(mb_pData, seed=12345)
data(ms)
summaryDE <- indDE(data=data,group=as.factor(group),data.type="microarray",
                  case.label="2", ctrl.label="1")
ms_pData <- summaryDE[,c(3,1)]
ms_MCMCout <- bayes(ms_pData, seed=12345)
data(mt)
summaryDE <- indDE(data=data,group=as.factor(group),data.type="microarray",
                  case.label="2", ctrl.label="1")
mt_pData <- summaryDE[,c(3,1)]
mt_MCMCout <- bayes(mt_pData, seed=12345)

#1. single pair example
mcmc.list <- list(hb_MCMCout,mb_MCMCout)
species <- c("human","mouse")
data(hm_orth)
mcmc.merge.list <- mergeMCMC(mcmc.list,species = species,
ortholog.db = hm_orth, reference=1) 

#2. multiple pairs example
mcmc.list <- list(hb_MCMCout,hs_MCMCout,ht_MCMCout,
                  mb_MCMCout,ms_MCMCout,mt_MCMCout)
species <- c(rep("human",3), rep("mouse",3))
data(hm_orth)
mcmc.merge.list <- mergeMCMC(mcmc.list,species = species,
ortholog.db = hm_orth, reference=1)                

## End(Not run)

matianzhou/CAMO documentation built on May 21, 2019, 10:12 a.m.