Mercurial > repos > iuc > raceid_main
comparison scripts/raceID_kmeans_heatmap.R @ 0:e01c989c7543 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid commit 39918bfdb08f06862ca395ce58a6f5e4f6dd1a5e
author | iuc |
---|---|
date | Sat, 03 Mar 2018 17:34:16 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e01c989c7543 |
---|---|
1 #!/usr/bin/env Rscript | |
2 | |
3 args = commandArgs(trailingOnly=T) | |
4 | |
5 script_dir = args[1] | |
6 config_file = args[2] | |
7 | |
8 # Load libs, common functions, source RaceID, | |
9 # Galaxy Params, and read input data (sc) | |
10 source(paste(script_dir, "common.R", sep="/")) | |
11 | |
12 # Read input data | |
13 message("Count matrix with %.0f cells and %.0f genes", dim(sc@fdata)[1], dim(sc@fdata)[2]) | |
14 message("Performing clustering using the following parameters: metric=%s, cln=%.0f, do.gap=%.0f clustnr=%.0f, B.gap=%.0f, SE.method=%s, SE.factor=%.2f, bootnr=%.0f, rseed=%.0f", c_metric, c_cln, dogap, c_clustnr, bgap, semethod, sefactor, c_bootnr, c_rseed) | |
15 | |
16 sc <- clustexp( | |
17 sc, | |
18 metric=c_metric, cln=c_cln, do.gap=dogap, clustnr=c_clustnr, | |
19 B.gap=bgap, SE.method=semethod, SE.factor=sefactor, | |
20 bootnr=c_bootnr, rseed=c_rseed | |
21 ) | |
22 | |
23 message("Plotting images") | |
24 plotter("plot_gap", plotgap(sc)) | |
25 plotter("plot_jaccard", plotjaccard(sc)) | |
26 plotter("plot_silhouette", plotsilhouette(sc)) | |
27 plotter("plot_clustheatmap", x <- clustheatmap(sc, final=FALSE, hmethod="single")) | |
28 | |
29 | |
30 message("Finished plots") | |
31 | |
32 if (generate_final_rdata){ | |
33 message("Saving SC object") | |
34 saveRDS(sc, output_rdat) | |
35 } | |
36 | |
37 | |
38 | |
39 | |
40 |