Mercurial > repos > proteore > proteore_goprofiles
comparison goprofiles.R @ 10:2138e0035e57 draft
planemo upload commit 4efc56eb769fbceb66c64181441ff8781d523454-dirty
author | proteore |
---|---|
date | Mon, 04 Mar 2019 08:20:52 -0500 |
parents | 948fecb6a40b |
children | 3ddc1f78773d |
comparison
equal
deleted
inserted
replaced
9:948fecb6a40b | 10:2138e0035e57 |
---|---|
90 return(c(profile.CC, profile.MF, profile.BP, profile.ALL)) | 90 return(c(profile.CC, profile.MF, profile.BP, profile.ALL)) |
91 } | 91 } |
92 | 92 |
93 #return height and width of plot in inches from profile | 93 #return height and width of plot in inches from profile |
94 plot_size_from_nb_onto <- function(profile){ | 94 plot_size_from_nb_onto <- function(profile){ |
95 width=10 | 95 width=10 |
96 range = seq(50, 2000, by=25) | 96 range = seq(25, 2000, by=25) |
97 names(range) = seq(8,242, by=3) | 97 names(range) = seq(5,242, by=3) |
98 nb_onto = round(nrow(profile[[1]])/25)*25 | 98 nb_onto = round(nrow(profile[[1]])/25)*25 |
99 height= as.integer(names(which(range==nb_onto))) | 99 if (nb_onto < 25) {nb_onto = 25} |
100 if (nb_onto <= 2000) { | |
101 height= as.integer(names(which(range==nb_onto))) | |
102 } else { | |
103 height=250 | |
104 } | |
100 return (c(width,height)) | 105 return (c(width,height)) |
101 } | 106 } |
102 | 107 |
103 make_plot <- function(profile,percent,title,onto,plot_opt){ | 108 make_plot <- function(profile,percent,title,onto,plot_opt){ |
104 | 109 |