comparison goseq.r @ 7:67c29afac85f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/goseq commit 8e60c1cecc4561d61624799b0999e89687677ab1
author iuc
date Sun, 17 Mar 2019 10:27:17 -0400
parents bbcf5f7f2af2
children 8b3e3657034e
comparison
equal deleted inserted replaced
6:07f6832bdd4d 7:67c29afac85f
157 for (m in names(results)) { 157 for (m in names(results)) {
158 p <- results[[m]] %>% 158 p <- results[[m]] %>%
159 top_n(10, wt=-over_represented_pvalue) %>% 159 top_n(10, wt=-over_represented_pvalue) %>%
160 mutate(hitsPerc=numDEInCat*100/numInCat) %>% 160 mutate(hitsPerc=numDEInCat*100/numInCat) %>%
161 ggplot(aes(x=hitsPerc, 161 ggplot(aes(x=hitsPerc,
162 y=substr(term, 1, 40), # only use 1st 40 chars of terms otherwise squashes plot 162 y=reorder(substr(term, 1, 40), -over_represented_pvalue), # only use 1st 40 chars of terms otherwise squashes plot
163 colour=over_represented_pvalue, 163 colour=p.adjust.over_represented,
164 size=numDEInCat)) + 164 size=numDEInCat)) +
165 geom_point() + 165 geom_point() +
166 expand_limits(x=0) + 166 expand_limits(x=0) +
167 labs(x="% DE in category", y="Category", colour="P value", size="Count", title=paste("Top over-represented categories in", cats_title), subtitle=paste(m, " method")) + 167 labs(x="% DE in category", y="Category", colour="Adj P value", size="Count", title=paste("Top over-represented categories in", cats_title), subtitle=paste(m, " method")) +
168 theme(plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5)) 168 theme(plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5))
169 print(p) 169 print(p)
170 } 170 }
171 dev.off() 171 dev.off()
172 } 172 }