ggplot(anno_count, aes(x=Category, y=Count, fill=Class))+
stat_summary(geom = "bar", fun = "mean", position = position_dodge(0.8))+
stat_summary(geom = "errorbar", fun.min = ebbottom, fun.max = ebtop, position = position_dodge(0.8), width=0.3) +
scale_fill_manual('', values=relation_color) + theme_few() +
theme(legend.position = 'right') +
labs(x='Phenotype category', y='Number of annotations')
dev.off()
anno_count %>% select(Category, Class, Count) %>% group_by(Category, Class) %>%
mutate(Mean = mean(Count)) %>% select(Category, Class, Mean) %>% unique()