Skip to contents

Batch adjustment by considering a measure relative to a reference sample

Usage

refMethod(Y, R1, R2)

Arguments

Y

data run in first or second batch, samples are rows and genes are columns. If correcting one batch only R1 is needed and would correspond to reference run in the same batch as Y, if calibrating one batch to the other Y represents the data from batch 2 and R1 would be reference run in batch 1 and R2 would be reference from batch 2

R1

reference data run in the first batch

R2

reference data run in the second batch

Value

The Y data adjusted calibrated to batch 1 (if two batches are presented) or the data with reference sample expression removed if only one data is provided

Author

Aline Talhouk

Examples

set.seed(12)
A <- matrix(rnorm(120), ncol = 10)
B <- matrix(rnorm(80), ncol = 10)
C <- matrix(rnorm(50), ncol = 10)
refMethod(A, B, C)
#>              [,1]        [,2]        [,3]       [,4]       [,5]        [,6]
#>  [1,] -0.48334039 -1.02931621 -0.43591273 -0.6704627  0.5392092  0.08516485
#>  [2,]  2.57439667 -0.23779794  0.32194728 -1.4247594 -0.6848433  0.67303876
#>  [3,]  0.04048272 -0.40216594  0.39022645 -0.1471415 -0.2349291  0.53438659
#>  [4,]  0.07722195 -0.95321395  0.72045471 -1.9496980 -0.3049147 -0.12425292
#>  [5,] -1.00041489  0.93912946  0.73513201 -0.8402626  0.2645831  0.51294320
#>  [6,]  0.72493116  0.09076257  0.95139683 -2.1012397  1.8280907  0.52540831
#>  [7,]  0.68187849  0.25721847  1.26331328 -0.3671122 -1.2431342  1.63272341
#>  [8,]  0.36897197 -0.54305485  2.66136788 -2.5408725  0.5424080 -2.47064184
#>  [9,]  0.89076332 -0.02610828  0.04830346 -1.2537505  0.3470056  0.64973843
#> [10,]  1.42524200  1.75745176 -0.48116005 -0.4957809 -1.5065170  0.82367973
#> [11,]  0.21950762  0.76222942  0.21687538 -1.9223001 -0.4422829 -0.84678247
#> [12,] -0.29665510 -0.55220894  0.10419076 -0.7552490  0.1219604 -0.07106174
#>               [,7]        [,8]       [,9]      [,10]
#>  [1,] -0.006878097 -0.08182265  0.5790744 -1.6117353
#>  [2,]  0.240008892  0.83871351 -0.5679448  1.0757727
#>  [3,]  0.319218048 -0.23516770 -0.1122204 -0.3695186
#>  [4,] -0.211309689  1.05526584 -0.8805058 -0.9701748
#>  [5,] -0.848525273 -0.60033210  2.0535120 -0.9670253
#>  [6,]  0.038578120 -1.02184157  0.1782235  0.3044010
#>  [7,]  0.939284317  0.31800516  1.9273169 -1.6249137
#>  [8,]  0.244559970 -1.04311704 -0.4246646 -1.7972082
#>  [9,]  0.426786553  0.83911616  0.2338520 -0.6547853
#> [10,] -0.851531037  0.07081929  0.9159172 -0.5319812
#> [11,]  0.220418176  0.97525974 -0.1174622 -0.1854672
#> [12,]  1.586994394 -0.40073251  0.5109731  0.7617871