rehybridize: Virtual rehybridization with an array-to-sample assignment

Description Usage Arguments Value Examples

Description

Create simulated dataset through "virtual rehybridization" for a given array-to-sample assignment.

Usage

1
2
3
4
rehybridize(biological.effect, handling.effect, group.id,
  group.id.level = c("E", "V"), array.to.sample.assign, icombat = FALSE,
  isva = FALSE, iruv = FALSE, biological.effect.ctrl = NULL,
  handling.effect.ctrl = NULL)

Arguments

biological.effect

the estimated biological effect dataset. The dataset must have rows as probes and columns as samples.

handling.effect

the estimated handling effect dataset. The dataset must have rows as probes and columns as samples. It must have the same dimensions and the same probe names as the estimated biological effect dataset.

group.id

a vector of sample-group labels for each sample of the estimated biological effect dataset. It must be a 2-level non-numeric factor vector.

group.id.level

a vector of sample-group label level. It must have two and only two elements and the first element is the reference. By default, group.id.level = c("E", "V"). That is in our study, we compare endometrial tumor samples to ovarian tumor samples, with endometrial as our reference.

array.to.sample.assign

a vector of indices that assign arrays to samples (see details in blocking.design, confounding.design or stratification.design). It must have an equal length to the number of samples in the estimated biological effect dataset. The first half arrays in the vector have to be assigned to the sample group 1 and the second half to sample group 2.

icombat

an indicator for combat adjustment. By default, icombat = FALSE for no ComBat adjustment.

isva

an indicator for sva adjustment. By default, isva = FALSE for no sva adjustment.

iruv

an indicator for RUV-4 adjustment. By default, iruv = FALSE for no RUV-4 adjustment.

biological.effect.ctrl

the negative-control probe biological effect data if iruv = TRUE. This dataset must have rows as probes and columns as samples. It also must have the same number of samples and the same sample names as biological.effect.

handling.effect.ctrl

the negative-control probe handling effect data if iruv = TRUE. It also must have the same dimensions and the same probe names as biological.effect.ctrl.

Value

simulated data, after batch adjustment if specified

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
## Not run: 
biological.effect <- estimate.biological.effect(uhdata = uhdata.pl)
handling.effect <- estimate.handling.effect(uhdata = uhdata.pl,
                             nuhdata = nuhdata.pl)

ctrl.genes <- unique(rownames(uhdata.pl))[grep("NC", unique(rownames(uhdata.pl)))]

biological.effect.nc <- biological.effect[!rownames(biological.effect) %in% ctrl.genes, ]
handling.effect.nc <- handling.effect[!rownames(handling.effect) %in% ctrl.genes, ]

assign.ind <- confounding.design(seed = 1, num.array = 192,
degree = "complete", rev.order = FALSE)

group.id <- substr(colnames(biological.effect.nc), 7, 7)

# no batch effect adjustment (default)
sim.data.raw <- rehybridize(biological.effect = biological.effect.nc,
                            handling.effect = handling.effect.nc,
                            group.id = group.id,
                            array.to.sample.assign = assign.ind)

# batch effect adjusting with sva
sim.data.sva <- rehybridize(biological.effect = biological.effect.nc,
                            handling.effect = handling.effect.nc,
                            group.id = group.id,
                            array.to.sample.assign = assign.ind,
                            isva = TRUE)

# batch effect adjusting with RUV-4
biological.effect.ctrl <- biological.effect[rownames(biological.effect) %in% ctrl.genes, ]
handling.effect.ctrl <- handling.effect[rownames(handling.effect) %in% ctrl.genes, ]

sim.data.ruv <- rehybridize(biological.effect = biological.effect.nc,
                            handling.effect = handling.effect.nc,
                            group.id = group.id,
                            array.to.sample.assign = assign.ind,
                            iruv = TRUE,
                            biological.effect.ctrl = biological.effect.ctrl,
                            handling.effect.ctrl = handling.effect.ctrl)

## End(Not run)

LXQin/precision documentation built on May 11, 2019, 6:24 p.m.