plot_platemap: Platemap for a given data

Description Usage Arguments Value Examples

Description

Generic function for plotting a map of the given data and plateformat.

Usage

1
2
3
4
plot_platemap(plateformat, plot_data, legend_txt_bg_col, las2 = 2, las3 = 0,
  cex_axis = 1.2, legend_pch = 21, symbol_size = rep(0.3, plateformat),
  legend_text_width = NULL, legend_ncol = 4, legend_posX = 0,
  legend_posY = -1, legend_symbol_size = 1.8, legend_text_size = 1.2, ...)

Arguments

plateformat

An integer which can be one of 96 or 384 or 1536

plot_data

A dataframe with three columns such as first column representing the text characters used to label the y-axis, second column representing the character used to label the x-axis of platemap, third column representing the data subtypes.

legend_txt_bg_col

Named vector representing the data subtypes as legend text and colors as their names

las2

numeric in 0,1,2,3; the style of axis labels. for more info, refer las in help(par)

las3

numeric in 0,1,2,3; the style of axis labels. for more info refer las in help(par)

cex_axis

size of text in the axis

legend_pch

plotting character or symbol for legend label. for more info, refer help(pch)

symbol_size

A numeric vector representing the size of symbols plotted at any coordinates of the plotting region

legend_text_width

the width of the legend text in x ("user") coordinates. (Should be positive even for a reversed x axis.) Defaults to the proper value computed by strwidth(legend).

legend_ncol

the number of columns in which to set the legend items (default is 1, a vertical legend).

legend_posX

the x co-ordinates to be used to position the legend.

legend_posY

the y co-ordinates to be used to position the legend.

legend_symbol_size

size of symbols used in the legend label.

legend_text_size

size of text used in the legend label.

...

Arguments to be passed to methods, such as graphical parameters (see help(par)). Many methods will accept the following arguments:

Value

A figure with a map of the plate with data subtypes color coded as specified in legend_txt_bg_col

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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
legend_txt_bg_col <- c('Empty'                     = 'red',
                       'Pinning Error'             = 'black',
                       'Morethan Plate Median'     = '#660066',
                       'Lessthan Plate Median'     = 'green',
                       'Morethan 90% Plate Median' = 'cyan',
                       'Lessthan 25% Plate Median' = 'yellow',
                       'Excluded Colonies'         = 'blue')
data_subtypes_384 <- colonyarea$data_subtypes
across_1536 <- convert_small_to_large(plate_from = 384,
                                      plate_to = 1536,
                                      data_from = data_subtypes_384,
                                      in_data_flow = 'across',
                                      out_data_flow = 'across',
                                      is_plate_coords = TRUE)
across_down_1536 <- convert_small_to_large(plate_from = 384,
                                           plate_to = 1536,
                                           data_from = data_subtypes_384,
                                           in_data_flow = 'across',
                                           out_data_flow = 'down',
                                           is_plate_coords = TRUE)

down_1536 <- convert_small_to_large(plate_from = 384,
                                      plate_to = 1536,
                                      data_from = data_subtypes_384,
                                      in_data_flow = 'down',
                                      out_data_flow = 'down',
                                      is_plate_coords = TRUE)

# 384 plate format
plateformat <- 384
across_384 <- convert_large_to_small(plate_from = 1536,
                                     plate_to = 384,
                                     data_from = across_1536$y,
                                     in_data_flow = 'across',
                                     out_data_flow = 'across',
                                     is_plate_coords = TRUE)

down_384 <- convert_large_to_small(plate_from = 1536,
                                     plate_to = 384,
                                     data_from = down_1536$y,
                                     in_data_flow = 'down',
                                     out_data_flow = 'down',
                                     is_plate_coords = TRUE)

plot_platemap(plateformat = plateformat,
              plot_data = across_384,
              legend_txt_bg_col = legend_txt_bg_col)

plot_platemap(plateformat = plateformat,
              plot_data = down_384,
              legend_txt_bg_col = legend_txt_bg_col)

# 1536 plate format
plateformat <- 1536
plot_platemap(plateformat = plateformat,
              plot_data = across_1536,
              legend_txt_bg_col = legend_txt_bg_col)

plot_platemap(plateformat = plateformat,
              plot_data = across_down_1536,
              legend_txt_bg_col = legend_txt_bg_col)

plot_platemap(plateformat = plateformat,
              plot_data = down_1536,
              legend_txt_bg_col = legend_txt_bg_col)

# 6144 plate format
plateformat <- 6144
across_6144 <- convert_small_to_large(plate_from = 1536,
                                      plate_to = plateformat,
                                      data_from = across_1536[,3],
                                      in_data_flow = 'across',
                                      out_data_flow = 'across',
                                      is_plate_coords = TRUE)

plot_platemap(plateformat = plateformat,
              plot_data = across_6144,
              legend_txt_bg_col = legend_txt_bg_col)

sathishsrinivasank/pinerrordetector documentation built on May 7, 2019, 2:55 a.m.