-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile.Rmd
79 lines (55 loc) · 1.76 KB
/
compile.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
79
---
title: "compile plate reader data"
author: "Cameron Strachan"
date: "August 4, 2016"
output: html_document
---
```{r}
library(reshape2)
library(ggplot2)
library(gridExtra)
library(RColorBrewer)
library(tidyr)
print("loading compile_inputs.csv from the current working directory")
getwd()
INPUTS <- read.csv("compile_inputs.csv")
inputfiles <- INPUTS[,1]=="File"
datfilenames<- INPUTS[inputfiles,2] # the list of inputs that are data files to be loaded
datfilenames<- unique(datfilenames) # remove duplicates (mistakes)
DAT<- read.csv(as.character(datfilenames[1]))
head(data)
```
```{r}
plates <- 25*100*2
i <- seq(29, plates, by = 58)
j <- seq(48, plates, by = 58)
fu85 <- DAT[i,]
fu85 <- na.omit(fu85) # remove NA values
fu85 <- as.data.frame(fu85) #check to make sure its a data frame
fu90 <- DAT[j,]
fu90 <- na.omit(fu90)
fu90 <- as.data.frame(fu90)
```
```{r}
names <-DAT[22,]
names[,1] <- list(NULL)
colnames = as.character(unlist(names[1,]))
colnames(fu85)[2:ncol(fu85)] <- colnames
colnames(fu85)[1] <- c("Plate")
write.csv(fu85, "~/Desktop/170119 hep 5mM od compiled.csv")
write.csv(fu90, "~/Desktop/170119 hep 5mM gfp compiled.csv")
data <- read.csv("~/Desktop/160902_Screen_Comp.csv")
d_fu <- fu
d_fu <- separate(d_fu, col = Plate, into = c("Plate", "Treatment"), sep = "\\(")
d_fu <- separate(d_fu, col = Treatment, into = c("Treatment", "rm", sep = "\\)"))
d_fu[,c(3,4)] <- list(NULL)
data$Treatment[c(4,9)] <- "e"
eth <- subset(data, data$Treatment == "e")
bis <- subset(data, data$Treatment == "b")
pim <- subset(data, data$Treatment == "p")
hep <- subset(data, data$Treatment == "h")
wat <- subset(data, data$Treatment == "water")
bis_fold <- bis /
write.csv(d_fu, "~/Desktop/161007_7aminoheptanoic_MM.csv")
write.csv(d_od, "~/Desktop/161005_hep_od6.csv")
```