b_score: 2 way median polish

Description Usage Arguments Examples

View source: R/med_smooth.R

Description

2 way median polish to remove plate effects such as row/column/edge effects. Given a dataframe containing alpha-numeric wellIDs and numerical values, this b_score will return a dataframe of the same structure after a two-way median smooth.

Usage

1
b_score(data, well, plate)

Arguments

data

numeric data, either a vector or dataframe column

well

alpha-numeric wellIDs. e.g 'A01'

plate

numeric, number of wells within a plate, either 96 or 384

Examples

1
2
3
4
5
6
df <- data.frame(well = num_to_well(1:96),
                 vals = rnorm(96))

b_score(data = df$vals,
        well = df$well,
        plate = 96)

Example output

   well    residual
1   A01  0.10341508
2   A02 -0.06912666
3   A03 -0.32326124
4   A04  0.21342330
5   A05  1.54368265
6   A06 -0.56054318
7   A07 -0.08360968
8   A08 -0.06298260
9   A09 -0.02384670
10  A10 -2.77092198
11  A11  0.35125643
12  A12  1.54801193
13  B01  0.35885958
14  B02 -0.58922477
15  B03  1.21437308
16  B04 -0.21342330
17  B05  0.37898830
18  B06  1.52177514
19  B07 -0.48473836
20  B08  0.13802389
21  B09 -0.53802236
22  B10 -0.49289793
23  B11  1.21282115
24  B12 -1.02873338
25  C01 -0.79207575
26  C02  0.85916443
27  C03 -0.05639257
28  C04 -3.08578574
29  C05 -2.01744507
30  C06 -0.87395993
31  C07  0.54422240
32  C08  0.06949157
33  C09  0.02384670
34  C10  0.53103218
35  C11 -0.25349665
36  C12  1.47483323
37  D01  0.84788882
38  D02 -1.25990287
39  D03  0.32467529
40  D04  0.44374082
41  D05 -0.10771299
42  D06 -0.15984934
43  D07  1.21619558
44  D08  0.10609211
45  D09 -0.69636283
46  D10  0.75906906
47  D11 -0.21909908
48  D12 -0.99756919
49  E01 -0.10341508
50  E02  0.06912666
51  E03 -1.40572648
52  E04  0.69911202
53  E05  0.17446942
54  E06  0.47320814
55  E07 -1.15978003
56  E08 -3.08344995
57  E09  0.17488801
58  E10 -0.30876488
59  E11  0.50316105
60  E12 -0.34300081
61  F01 -0.93160356
62  F02  0.14198937
63  F03  0.05639257
64  F04  0.43379104
65  F05  0.08778334
66  F06 -0.73507801
67  F07 -0.06918869
68  F08 -0.74060708
69  F09  0.82858990
70  F10  1.02458843
71  F11  0.01846700
72  F12 -0.62218861
73  G01 -1.52218784
74  G02 -2.37271552
75  G03  0.60050307
76  G04 -1.87317253
77  G05 -0.08778334
78  G06  0.56562499
79  G07  0.67657502
80  G08 -1.02347035
81  G09  0.12363094
82  G10  0.30876488
83  G11 -1.50507103
84  G12  0.34300081
85  H01  0.35467117
86  H02  0.90845941
87  H03 -2.37717553
88  H04 -0.21629313
89  H05 -1.56698022
90  H06  0.15984934
91  H07  0.06918869
92  H08  0.06298260
93  H09 -0.72028555
94  H10 -1.36535588
95  H11 -0.01846700
96  H12  2.19214834

platetools documentation built on June 26, 2018, 1:02 a.m.