-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
81 lines (55 loc) · 2.2 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = ".README/README-",
fig.width = 3,
fig.height = 1.5
)
library('toxplate')
library('tibble')
library('magrittr')
```
# toxplate
Creates a plate layout for your experiment based on the top-left
and the bottom-right well and a possible zigzag pattern. These layout files can
be used to match the location (aka 'imageNr') in the image filename to the correct
well in the plate. The resulting plate layout data can be exported and used in
CellProfiler instead of putting all images in separate well folders.
## Usage
The `toxplate` package provides two functions: `getLayoutPicture` and `getLayoutMappingDF`. `getLayoutPicture` generates a picture of your layout, which you can use to store with your experiment and to inspect your layout before generating a layout mapping with `getLayoutMappingDF`. Both functions take the same arguments: the top-left and bottom-right well, the zigzag direction, and the starting number. For more details about the arguments use `?getLayoutPicture`
### getLayoutPicture
Example usage for a typical 24-well plate with 1 location per well, and zigzag over columns:
```{r}
getLayoutPicture("A01", "D06", "columns")
```
The same plate, but with zigzag over rows:
```{r}
getLayoutPicture("A01", "D06", "rows")
```
and without zigzag (rows):
```{r}
getLayoutPicture("A01", "D06", "notZigzagRowWise")
```
To use multiple positions per well just add the maximum position to the bottom-right well:
```{r, fig.width=4}
getLayoutPicture("A01", "D06_02", "columns")
```
One more example of a partially filled bigger plate
```{r, fig.width= 7, fig.height=3}
getLayoutPicture("C05", "K12_02", "rows")
```
### getLayoutMappingDF
When the layout is what you expect you can generate a mapping with `getLayoutMappingDF` (I used `as_tibble` to prevent long output):
```{r}
getLayoutMappingDF("A01", "D06_02", "columns") %>% as_tibble
```
## Installation
The `toxplate` package is not on CRAN (yet). To install it you need the `devtools` package:
```{r, eval=FALSE}
devtools::install_github('burgerga/toxplate')
```