#### generate boxplots of AUCs 

require(data.table) 
require(forcats)

#### Yeast data
aucs <- fread('~/Dropbox/TBC-2018-single-subject-methods-accuracies/Results/yeast/aucs.csv')

aucs$modnames[which(aucs$modnames=='Mixture Models')] <- 'Mixture Model'

p1= ggplot(aucs, aes(x=fct_reorder(modnames, aucs, fun = median, .desc =TRUE), y=aucs)) +  
  geom_boxplot(outlier.colour="red", outlier.shape=8,
               outlier.size=4)+
  facet_wrap(~curvetypes) + ylim(0,1) + theme_minimal()+
   theme(axis.text.x = element_text(angle = 90, hjust = 1,size = rel(3)))



pdf('~/Dropbox/TBC-2018-single-subject-methods-accuracies/Figures/BoxplotAUCs_yeast.pdf',
    onefile = F, width=17, height=11)
print(p1)
dev.off()



#### Cell Data MCF7 

aucs <- fread('~/Dropbox/TBC-2018-single-subject-methods-accuracies/Results/cell-line data/aucs.csv')

aucs$modnames[which(aucs$modnames=='Mixture Models')] <- 'Mixture Model'

p1= ggplot(aucs, aes(x=fct_reorder(modnames, aucs, fun = median, .desc =TRUE), y=aucs)) +  
  geom_boxplot(outlier.colour="red", outlier.shape=8,
               outlier.size=4)+
  facet_wrap(~curvetypes) + ylim(0,1) + theme_minimal()+
  theme(axis.text.x = element_text(angle = 90, hjust = 1,size = rel(3)))



pdf('~/Dropbox/TBC-2018-single-subject-methods-accuracies/Figures/BoxplotAUCs_cell.pdf',
    onefile = F, width=17, height=11)
print(p1)
dev.off()
