diff options
Diffstat (limited to 'scripts/test-prediction-plot.R')
-rwxr-xr-x | scripts/test-prediction-plot.R | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/test-prediction-plot.R b/scripts/test-prediction-plot.R index db003d3..7201e1a 100755 --- a/scripts/test-prediction-plot.R +++ b/scripts/test-prediction-plot.R @@ -1,7 +1,9 @@ +#!/usr/bin/Rscript + library(ggplot2) training = read.csv("data/training-test-predictions.csv",header=T) -test <- read.csv("data/test.csv",header=T) +test <- read.csv("data/test_log10.csv",header=T) n = c("SMILES","LOAEL","Source") data = data.frame(factor(test$SMILES),test$LOAEL,factor(test$Dataset)) @@ -11,11 +13,11 @@ comb = data.frame(factor(training$SMILES),training$LOAEL_predicted,factor(traini names(comb) = n comb$Type = "predicted" data = rbind(data,comb) -data$LOAEL = -log(data$LOAEL) +#data$LOAEL = -log(data$LOAEL) data$SMILES <- reorder(data$SMILES,data$LOAEL) #img <- ggplot(data, aes(SMILES,LOAEL,ymin = min(LOAEL), ymax=max(LOAEL),shape=Source,color=Type)) img <- ggplot(data, aes(SMILES,LOAEL,ymin = min(LOAEL), ymax=max(LOAEL),color=Type)) img <- img + ylab('-log(LOAEL mg/kg_bw/day)') + xlab('Compound') + theme(axis.text.x = element_blank()) + theme(legend.title=element_blank()) img <- img + geom_point() -ggsave(file='figure/test-prediction.pdf', plot=img,width=12, height=8) +ggsave(file='figures/test-prediction.pdf', plot=img,width=12, height=8) |