diff options
Diffstat (limited to 'scripts/dataset-variability.R')
-rwxr-xr-x | scripts/dataset-variability.R | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/dataset-variability.R b/scripts/dataset-variability.R index 65234a4..f663b65 100755 --- a/scripts/dataset-variability.R +++ b/scripts/dataset-variability.R @@ -3,6 +3,7 @@ library(ggplot2) library(grid) library(gridExtra) +if (FALSE) { m = read.csv("data/mazzatorta_log10.csv",header=T) s = read.csv("data/swiss_log10.csv",header=T) @@ -11,8 +12,6 @@ s.dupsmi = unique(s$SMILES[duplicated(s$SMILES)]) m.dup = m[m$SMILES %in% m.dupsmi,] s.dup = s[s$SMILES %in% s.dupsmi,] -#m.dup$LOAEL= -log10(m.dup$LOAEL) -#s.dup$LOAEL= -log10(s.dup$LOAEL) m.dup$SMILES <- reorder(m.dup$SMILES,m.dup$LOAEL) s.dup$SMILES <- reorder(s.dup$SMILES,s.dup$LOAEL) @@ -22,13 +21,13 @@ p2 <- ggplot(s.dup, aes(SMILES,LOAEL),ymin = min(LOAEL), ymax=max(LOAEL)) + ylab #pdf('figure/dataset-variability.pdf') #grid.arrange(p1,p2,ncol=1) #dev.off() +} data <- read.csv("data/test_log10.csv",header=T) -#data$LOAEL = -log(data$LOAEL) data$SMILES <- reorder(data$SMILES,data$LOAEL) img = ggplot(data,aes(SMILES,LOAEL,ymin = min(LOAEL), ymax=max(LOAEL),color=Dataset)) + geom_point() img <- img + ylab('-log(LOAEL mg/kg_bw/day)') + xlab('Compound') + theme(axis.text.x = element_blank()) + theme(legend.title=element_blank()) img = img + scale_fill_discrete(breaks=c("Mazzatorta", "Both", "Swiss Federal Office")) -img = img +#img = img ggsave(file='figures/dataset-variability.pdf', plot=img, width=12,height=8) |