Mercurial > repos > proteore > proteore_clusterprofiler
changeset 9:60a3897346e0 draft
planemo upload commit eb8dd48804bfbeb0f0c8076458de65d66d7f075b-dirty
| author | proteore |
|---|---|
| date | Tue, 18 Sep 2018 10:44:34 -0400 |
| parents | ea5fecd4aa69 |
| children | 6604d9aa7cf3 |
| files | GO-enrich.R cluster_profiler.xml |
| diffstat | 2 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/GO-enrich.R Tue Sep 18 09:49:55 2018 -0400 +++ b/GO-enrich.R Tue Sep 18 10:44:34 2018 -0400 @@ -28,6 +28,7 @@ return(max(nchar(vector[1:nb_description]))) } +#used before the limit was set to 50 characters width_by_max_char <- function (nb_max_char) { if (nb_max_char < 50 ){ width=600 @@ -49,11 +50,11 @@ readable=TRUE) if (length(ggo@result$ID) > 0 ) { - ggo@result$Description <- sapply(as.vector(ggo@result$Description), function(x) {ifelse(nchar(x)>100, substr(x,1,100),x)},USE.NAMES = FALSE) - nb_max_char = max_str_length_10_first(ggo$Description) - width = width_by_max_char(nb_max_char) + ggo@result$Description <- sapply(as.vector(ggo@result$Description), function(x) {ifelse(nchar(x)>50, substr(x,1,50),x)},USE.NAMES = FALSE) + #nb_max_char = max_str_length_10_first(ggo$Description) + #width = width_by_max_char(nb_max_char) name <- paste("GGO_", ontology, "_bar-plot", sep = "") - png(name,height = 720, width = width) + png(name,height = 720, width = 600) p <- barplot(ggo, showCategory=10) print(p) dev.off() @@ -77,13 +78,13 @@ #if there are enriched GopTerms if (length(ego$ID)>0){ - ego@result$Description <- sapply(ego@result$Description, function(x) {ifelse(nchar(x)>100, substr(x,1,100),x)},USE.NAMES = FALSE) - nb_max_char = max_str_length_10_first(ego$Description) - width = width_by_max_char(nb_max_char) + ego@result$Description <- sapply(ego@result$Description, function(x) {ifelse(nchar(x)>50, substr(x,1,50),x)},USE.NAMES = FALSE) + #nb_max_char = max_str_length_10_first(ego$Description) + #width = width_by_max_char(nb_max_char) if ("dotplot" %in% plot ){ dot_name <- paste("EGO_", ontology, "_dot-plot", sep = "") - png(dot_name,height = 720, width = width) + png(dot_name,height = 720, width = 600) p <- dotplot(ego, showCategory=10) print(p) dev.off() @@ -91,7 +92,7 @@ if ("barplot" %in% plot ){ bar_name <- paste("EGO_", ontology, "_bar-plot", sep = "") - png(bar_name,height = 720, width = width) + png(bar_name,height = 720, width = 600) p <- barplot(ego) print(p) dev.off()
--- a/cluster_profiler.xml Tue Sep 18 09:49:55 2018 -0400 +++ b/cluster_profiler.xml Tue Sep 18 10:44:34 2018 -0400 @@ -1,4 +1,4 @@ -<tool id="cluter_profiler" name="clusterProfiler" version="2018.09.18.4"> +<tool id="cluter_profiler" name="clusterProfiler" version="2018.09.18.5"> <description> GO terms classification and enrichment analysis </description>
