comparison masigpro.R @ 2:db04ba860dab draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/masigpro commit 54ebbdebc9861af600371928cb9915095941c231
author iuc
date Thu, 13 Jul 2017 18:23:17 -0400
parents cc96abdef027
children 402e0b9cfd87
comparison
equal deleted inserted replaced
1:cc96abdef027 2:db04ba860dab
90 make_option("--rsq", type="double", default=0.7), 90 make_option("--rsq", type="double", default=0.7),
91 make_option("--vars", type="character", default="groups"), 91 make_option("--vars", type="character", default="groups"),
92 make_option("--significant_intercept", type="character", default="dummy"), 92 make_option("--significant_intercept", type="character", default="dummy"),
93 make_option("--cluster_data", type="integer", default=1), 93 make_option("--cluster_data", type="integer", default=1),
94 make_option(c("-k", "--k"), type="integer", default=9), 94 make_option(c("-k", "--k"), type="integer", default=9),
95 make_option("--print_cluster", type="logical", default=FALSE),
95 make_option("--cluster_method", type="character", default="hclust"), 96 make_option("--cluster_method", type="character", default="hclust"),
96 make_option("--distance", type="character", default="cor"), 97 make_option("--distance", type="character", default="cor"),
97 make_option("--agglo_method", type="character", default="ward.D"), 98 make_option("--agglo_method", type="character", default="ward.D"),
98 make_option("--iter_max", type="integer", default=500), 99 make_option("--iter_max", type="integer", default=500),
99 make_option("--color_mode", type="character", default="rainbow"), 100 make_option("--color_mode", type="character", default="rainbow"),
141 agglo.method = opt$agglo_method, iter.max = opt$iter_max, 142 agglo.method = opt$agglo_method, iter.max = opt$iter_max,
142 color.mode = opt$color_mode, show.fit = opt$show_fit, 143 color.mode = opt$color_mode, show.fit = opt$show_fit,
143 show.lines = opt$show_lines, cexlab = opt$cexlab, 144 show.lines = opt$show_lines, cexlab = opt$cexlab,
144 legend = opt$legend) 145 legend = opt$legend)
145 146
147 if (opt$print_cluster) {
148 for (i in 1:length(results$sig.genes)) {
149
150 colname <- paste(names(results$sig.genes)[i], "cluster", sep = "_")
151
152 results$summary[colname] <- ""
153 results$summary[[colname]][1:length(results$sig.genes[[i]]$sig.profiles$`cluster$cut`)] <-
154 results$sig.genes[[i]]$sig.profiles$`cluster$cut`
155 }
156 }
157
146 filename <- opt$outfile 158 filename <- opt$outfile
147 159
148 write.table((results$summary), file=filename, sep="\t", quote=FALSE, 160 write.table((results$summary), file=filename, sep="\t", quote=FALSE,
149 row.names=FALSE, col.names=TRUE) 161 row.names=FALSE, col.names=TRUE)
150 162