amplify.handling.effect: Handling effect amplification

Description Usage Arguments Value Examples

Description

Amplify handling effect in pre-specified slides by either a location shift or a scale change.

Usage

1
2
amplify.handling.effect(handling.effect, amplify.array.id, amplify.level,
  type = "shift")

Arguments

handling.effect

the estimated handling effect dataset to be modified. The dataset must have rows as probes and columns as samples.

amplify.array.id

the array IDs specified to have its handling effect amplified. If type = "shift" or type = "scale1", a vector of array IDs must be supplied. If type = "scale2", a list of vectors of array IDs must be supplied; each element in the list must be a vector of array IDs.

amplify.level

a multiplier specified to amplify handling effect by. A numeric multiplier must be supplied if type = "shift" or type = "scale1". A vector of multipliers must be supplied if type = "scale2" and it must have an equal length to the amplify.array.id list.

type

a choice of amplification type, either "shift", "scale1" or "scale2" for either location shift or scale change. By default, type = "shift". Location shift moves the entire specified arrays up or down by a constant. Scale change 1 re-scales expressions that are in inter-quartiles towards the first and the third quartiles Within each array; expressions that are outside of the inter-quartile range remain unchanged. Scale change 2 re-scales expressions by the power of constants that are specified by the user for each batch.

Value

an handling-effect-amplified set of handling effects

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
## 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, ]

handling.effect.nc.tr <- handling.effect.nc[, c(1:64, 129:192)]

# location shift
handling.effect.nc.tr.shift <- amplify.handling.effect(handling.effect = handling.effect.nc.tr,
                                       amplify.array.id = colnames(handling.effect.nc.tr)[1:64],
                                       amplify.level = 2, type = "shift")

# scale change 1
handling.effect.nc.tr.scale1 <- amplify.handling.effect(handling.effect = handling.effect.nc.tr,
                                        amplify.array.id = colnames(handling.effect.nc.tr)[1:64],
                                        amplify.level = 2, type = "scale1")

# scale change 2
amplify.array.id <- list(1:40, 41:64, (129:160) - 64, (161:192) - 64)
for(i in 1:length(amplify.array.id))
  amplify.array.id[[i]] <- colnames(handling.effect.nc.tr)[amplify.array.id[[i]]]
amplify.level <- c(1.2, 1.3, 1/3, 2/3)

handling.effect.nc.tr.scale2 <- amplify.handling.effect(handling.effect = handling.effect.nc.tr,
                                        amplify.array.id = amplify.array.id,
                                        amplify.level = amplify.level,
                                        type = "scale2")


par(mfrow = c(2, 2), mar = c(4, 3, 2, 2))
rng <- range(handling.effect.nc.tr, handling.effect.nc.tr.shift,
             handling.effect.nc.tr.scale1, handling.effect.nc.tr.scale2)
boxplot(handling.effect.nc.tr, main = "original",
        ylim = rng, pch = 20, cex = 0.2, xaxt = "n")
boxplot(handling.effect.nc.tr.shift, main = "shifted",
        ylim = rng, pch = 20, cex = 0.2, xaxt = "n")
boxplot(handling.effect.nc.tr.scale1, main = "scaled 1",
        ylim = rng, pch = 20, cex = 0.2, xaxt = "n")
boxplot(handling.effect.nc.tr.scale2, main = "scaled 2",
        ylim = rng, pch = 20, cex = 0.2, xaxt = "n")

## End(Not run)

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