Mercurial > repos > artbio > gsc_high_dimensions_visualisation
annotate high_dim_visu.R @ 0:241dd93219d7 draft
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
| author | artbio | 
|---|---|
| date | Thu, 11 Jul 2019 12:31:00 -0400 | 
| parents | |
| children | 8e6ce12edd90 | 
| rev | line source | 
|---|---|
| 
0
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
1 # load packages that are provided in the conda env | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
2 options( show.error.messages=F, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
3 error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
4 loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
5 requiredPackages = c('optparse', 'Rtsne', 'ggplot2', 'ggfortify') | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
6 warnings() | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
7 library(optparse) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
8 library(FactoMineR) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
9 library(factoextra) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
10 library(Rtsne) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
11 library(ggplot2) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
12 library(ggfortify) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
13 library(RColorBrewer) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
14 library(ClusterR) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
15 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
16 # Arguments | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
17 option_list = list( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
18 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
19 "--data", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
20 default = NA, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
21 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
22 help = "Input file that contains expression value to visualise" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
23 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
24 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
25 "--sep", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
26 default = '\t', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
27 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
28 help = "File separator [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
29 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
30 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
31 "--colnames", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
32 default = TRUE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
33 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
34 help = "Consider first line as header ? [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
35 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
36 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
37 "--out", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
38 default = "res.tab", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
39 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
40 help = "Output name [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
41 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
42 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
43 "--labels", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
44 default = FALSE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
45 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
46 help = "add labels in scatter plots [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
47 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
48 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
49 "--factor", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
50 default = '', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
51 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
52 help = "A two column table that specifies factor levels for contrasting data [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
53 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
54 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
55 "--visu_choice", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
56 default = 'PCA', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
57 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
58 help = "visualisation method ('PCA', 'tSNE', 'HCPC') [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
59 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
60 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
61 "--table_coordinates", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
62 default = '', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
63 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
64 help = "Table with plot coordinates [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
65 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
66 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
67 "--Rtsne_seed", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
68 default = 42, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
69 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
70 help = "Seed value for reproducibility [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
71 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
72 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
73 "--Rtsne_dims", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
74 default = 2, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
75 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
76 help = "Output dimensionality [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
77 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
78 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
79 "--Rtsne_initial_dims", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
80 default = 50, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
81 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
82 help = "The number of dimensions that should be retained in the initial PCA step [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
83 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
84 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
85 "--Rtsne_perplexity", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
86 default = 5.0, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
87 type = 'numeric', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
88 help = "perplexity [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
89 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
90 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
91 "--Rtsne_theta", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
92 default = 1.0, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
93 type = 'numeric', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
94 help = "theta [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
95 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
96 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
97 "--Rtsne_max_iter", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
98 default = 1000, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
99 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
100 help = "max_iter [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
101 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
102 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
103 "--Rtsne_pca", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
104 default = TRUE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
105 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
106 help = "Whether an initial PCA step should be performed [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
107 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
108 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
109 "--Rtsne_pca_center", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
110 default = TRUE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
111 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
112 help = "Should data be centered before pca is applied? [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
113 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
114 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
115 "--Rtsne_pca_scale", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
116 default = FALSE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
117 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
118 help = "Should data be scaled before pca is applied? [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
119 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
120 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
121 "--Rtsne_normalize", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
122 default = TRUE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
123 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
124 help = "Should data be normalized internally prior to distance calculations? [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
125 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
126 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
127 "--Rtsne_exaggeration_factor", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
128 default = 12.0, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
129 type = 'numeric', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
130 help = " Exaggeration factor used to multiply the P matrix in the first part of the optimization [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
131 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
132 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
133 "--PCA_npc", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
134 default = 5, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
135 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
136 help = "number of dimensions kept in the results [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
137 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
138 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
139 "--PCA_x_axis", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
140 default = 1, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
141 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
142 help = "PC to plot in the x axis [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
143 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
144 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
145 "--PCA_y_axis", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
146 default = 2, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
147 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
148 help = "PC to plot in the y axis [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
149 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
150 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
151 "--HCPC_ncluster", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
152 default = -1, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
153 type = 'numeric', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
154 help = "nb.clust, number of clusters to consider in the hierarchical clustering. [default : -1 let HCPC to optimize the number]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
155 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
156 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
157 "--HCPC_npc", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
158 default = 5, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
159 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
160 help = "npc, number of dimensions which are kept for HCPC analysis [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
161 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
162 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
163 "--HCPC_metric", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
164 default = 'euclidian', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
165 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
166 help = "Metric to be used for calculating dissimilarities between observations, available 'euclidian' or 'manhattan' [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
167 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
168 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
169 "--HCPC_method", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
170 default = 'ward', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
171 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
172 help = "Clustering method between 'ward','average','single', 'complete', 'weighted' [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
173 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
174 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
175 "--pdf_out", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
176 default = "out.pdf", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
177 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
178 help = "pdf of plots [default : '%default' ]" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
179 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
180 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
181 "--HCPC_consol", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
182 default = 'TRUE', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
183 type = 'logical', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
184 help = "If TRUE, a k-means consolidation is performed [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
185 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
186 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
187 "--HCPC_itermax", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
188 default = '10', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
189 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
190 help = "The maximum number of iterations for the consolidation [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
191 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
192 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
193 "--HCPC_min", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
194 default = '3', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
195 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
196 help = "The least possible number of clusters suggested [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
197 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
198 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
199 "--HCPC_max", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
200 default = -1, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
201 type = 'integer', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
202 help = "The higher possible number of clusters suggested [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
203 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
204 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
205 "--HCPC_clusterCA", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
206 default = 'rows', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
207 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
208 help = "A string equals to 'rows' or 'columns' for the clustering of Correspondence Analysis results [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
209 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
210 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
211 "--HCPC_kk", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
212 default = -1, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
213 type = 'numeric', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
214 help = "The maximum number of iterations for the consolidation [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
215 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
216 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
217 "--HCPC_clust", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
218 default = "", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
219 type = 'character', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
220 help = "Output result of HCPC clustering : two column table (cell identifiers and clusters) [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
221 ), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
222 make_option( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
223 "--mutual_info", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
224 default = "", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
225 type = "character", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
226 help = "Output file of external validation of HCPC clustering with factor levels [default :'%default']" | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
227 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
228 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
229 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
230 opt = parse_args(OptionParser(option_list = option_list), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
231 args = commandArgs(trailingOnly = TRUE)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
232 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
233 if (opt$sep == "tab") {opt$sep <- "\t"} | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
234 if (opt$sep == "comma") {opt$sep <- ","} | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
235 if(opt$HCPC_max == -1) {opt$HCPC_max <- NULL} | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
236 if(opt$HCPC_kk == -1) {opt$HCPC_kk <- Inf} | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
237 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
238 ##Add legend to plot() | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
239 legend.col <- function(col, lev){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
240 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
241 opar <- par | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
242 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
243 n <- length(col) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
244 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
245 bx <- par("usr") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
246 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
247 box.cx <- c(bx[2] + (bx[2] - bx[1]) / 1000, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
248 bx[2] + (bx[2] - bx[1]) / 1000 + (bx[2] - bx[1]) / 50) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
249 box.cy <- c(bx[3], bx[3]) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
250 box.sy <- (bx[4] - bx[3]) / n | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
251 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
252 xx <- rep(box.cx, each = 2) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
253 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
254 par(xpd = TRUE) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
255 for(i in 1:n){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
256 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
257 yy <- c(box.cy[1] + (box.sy * (i - 1)), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
258 box.cy[1] + (box.sy * (i)), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
259 box.cy[1] + (box.sy * (i)), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
260 box.cy[1] + (box.sy * (i - 1))) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
261 polygon(xx, yy, col = col[i], border = col[i]) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
262 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
263 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
264 par(new = TRUE) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
265 plot(0, 0, type = "n", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
266 ylim = c(min(lev), max(lev)), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
267 yaxt = "n", ylab = "", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
268 xaxt = "n", xlab = "", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
269 frame.plot = FALSE) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
270 axis(side = 4, las = 2, tick = FALSE, line = .25) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
271 par <- opar | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
272 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
273 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
274 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
275 data = read.table( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
276 opt$data, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
277 check.names = FALSE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
278 header = opt$colnames, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
279 row.names = 1, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
280 sep = opt$sep | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
281 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
282 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
283 # Contrasting factor and its colors | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
284 if (opt$factor != '') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
285 contrasting_factor <- read.delim( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
286 opt$factor, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
287 header = TRUE | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
288 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
289 rownames(contrasting_factor) <- contrasting_factor[,1] | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
290 contrasting_factor <- contrasting_factor[colnames(data),] | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
291 colnames(contrasting_factor) <- c("id","factor") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
292 if(is.numeric(contrasting_factor$factor)){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
293 factor_cols <- rev(brewer.pal(n = 11, name = "RdYlGn"))[contrasting_factor$factor] | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
294 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
295 contrasting_factor$factor <- as.factor(contrasting_factor$factor) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
296 if(nlevels(contrasting_factor$factor) == 2){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
297 colors_labels <- c("#E41A1C", "#377EB8") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
298 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
299 colors_labels <- brewer.pal(nlevels(contrasting_factor$factor), name = 'Paired') | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
300 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
301 factorColors <- | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
302 with(contrasting_factor, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
303 data.frame(factor = levels(contrasting_factor$factor), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
304 color = I(colors_labels) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
305 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
306 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
307 factor_cols <- factorColors$color[match(contrasting_factor$factor, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
308 factorColors$factor)] | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
309 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
310 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
311 factor_cols <- rep("deepskyblue4", length(rownames(data))) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
312 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
313 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
314 ################ t-SNE #################### | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
315 if (opt$visu_choice == 'tSNE') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
316 # filter and transpose df for tsne and pca | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
317 tdf = t(data) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
318 # make tsne and plot results | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
319 set.seed(opt$Rtsne_seed) ## Sets seed for reproducibility | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
320 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
321 tsne_out <- Rtsne(tdf, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
322 dims = opt$Rtsne_dims, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
323 initial_dims = opt$Rtsne_initial_dims, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
324 perplexity = opt$Rtsne_perplexity , | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
325 theta = opt$Rtsne_theta, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
326 max_iter = opt$Rtsne_max_iter, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
327 pca = opt$Rtsne_pca, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
328 pca_center = opt$Rtsne_pca_center, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
329 pca_scale = opt$Rtsne_pca_scale, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
330 normalize = opt$Rtsne_normalize, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
331 exaggeration_factor=opt$Rtsne_exaggeration_factor) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
332 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
333 embedding <- as.data.frame(tsne_out$Y[,1:2]) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
334 embedding$Class <- as.factor(rownames(tdf)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
335 gg_legend = theme(legend.position="right") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
336 if (opt$factor == '') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
337 ggplot(embedding, aes(x=V1, y=V2)) + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
338 geom_point(size=1, color='deepskyblue4') + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
339 gg_legend + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
340 xlab("t-SNE 1") + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
341 ylab("t-SNE 2") + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
342 ggtitle('t-SNE') + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
343 if (opt$labels) { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
344 geom_text(aes(label=Class),hjust=-0.2, vjust=-0.5, size=1.5, color='deepskyblue4') | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
345 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
346 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
347 if(is.numeric(contrasting_factor$factor)){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
348 embedding$factor <- contrasting_factor$factor | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
349 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
350 embedding$factor <- as.factor(contrasting_factor$factor) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
351 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
352 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
353 ggplot(embedding, aes(x=V1, y=V2, color=factor)) + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
354 geom_point(size=1) + #, color=factor_cols | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
355 gg_legend + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
356 xlab("t-SNE 1") + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
357 ylab("t-SNE 2") + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
358 ggtitle('t-SNE') + | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
359 if (opt$labels) { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
360 geom_text(aes(label=Class, colour=factor),hjust=-0.2, vjust=-0.5, size=1.5) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
361 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
362 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
363 ggsave(file=opt$pdf_out, device="pdf") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
364 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
365 #save coordinates table | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
366 if(opt$table_coordinates != ''){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
367 coord_table <- cbind(rownames(tdf), round(as.data.frame(tsne_out$Y), 6)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
368 colnames(coord_table)=c("Cells",paste0("DIM",(1:opt$Rtsne_dims))) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
369 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
370 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
371 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
372 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
373 ######### make PCA with FactoMineR ################# | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
374 if (opt$visu_choice == 'PCA') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
375 pca <- PCA(t(data), ncp=opt$PCA_npc, graph=FALSE) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
376 pdf(opt$pdf_out) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
377 if (opt$labels == FALSE) { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
378 plot(pca, axes = c(opt$PCA_x_axis,opt$PCA_y_axis), label="none" , col.ind = factor_cols) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
379 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
380 plot(pca, axes = c(opt$PCA_x_axis,opt$PCA_y_axis), cex=0.2 , col.ind = factor_cols) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
381 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
382 if (opt$factor != '') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
383 if(is.factor(contrasting_factor$factor)) { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
384 legend(x = 'topright', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
385 legend = as.character(factorColors$factor), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
386 col = factorColors$color, pch = 16, bty = 'n', xjust = 1, cex=0.7) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
387 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
388 legend.col(col = rev(brewer.pal(n = 11, name = "RdYlGn")), lev = cut(contrasting_factor$factor, 11, label = FALSE)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
389 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
390 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
391 dev.off() | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
392 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
393 #save coordinates table | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
394 if(opt$table_coordinates != ''){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
395 coord_table <- cbind(rownames(pca$ind$coord), round(as.data.frame(pca$ind$coord), 6)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
396 colnames(coord_table)=c("Cells",paste0("DIM",(1:opt$PCA_npc))) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
397 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
398 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
399 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
400 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
401 ########### make HCPC with FactoMineR ########## | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
402 if (opt$visu_choice == 'HCPC') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
403 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
404 # HCPC starts with a PCA | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
405 pca <- PCA( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
406 t(data), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
407 ncp = opt$HCPC_npc, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
408 graph = FALSE, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
409 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
410 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
411 PCA_IndCoord = as.data.frame(pca$ind$coord) # coordinates of observations in PCA | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
412 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
413 # Hierarchical Clustering On Principal Components Followed By Kmean Clustering | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
414 res.hcpc <- HCPC(pca, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
415 nb.clust=opt$HCPC_ncluster, metric=opt$HCPC_metric, method=opt$HCPC_method, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
416 graph=F,consol=opt$HCPC_consol,iter.max=opt$HCPC_itermax,min=opt$HCPC_min,max=opt$HCPC_max, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
417 cluster.CA=opt$HCPC_clusterCA,kk=opt$HCPC_kk) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
418 # HCPC plots | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
419 dims <- head(as.data.frame(res.hcpc$call$t$res$eig),2) # dims variances in column 2 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
420 pdf(opt$pdf_out) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
421 plot(res.hcpc, choice="tree") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
422 plot(res.hcpc, choice="bar") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
423 plot(res.hcpc, choice="3D.map") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
424 if (opt$labels == FALSE) { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
425 plot(res.hcpc, choice="map", label="none") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
426 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
427 plot(res.hcpc, choice="map") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
428 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
429 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
430 # user contrasts on the pca | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
431 if (opt$factor != '') { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
432 plot(pca, label="none", col.ind = factor_cols) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
433 if(is.factor(contrasting_factor$factor)) { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
434 legend(x = 'topright', | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
435 legend = as.character(factorColors$factor), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
436 col = factorColors$color, pch = 16, bty = 'n', xjust = 1, cex=0.7) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
437 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
438 ## Normalized Mutual Information | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
439 sink(opt$mutual_info) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
440 res <- external_validation( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
441 true_labels = as.numeric(contrasting_factor$factor), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
442 clusters = as.numeric(res.hcpc$data.clust$clust), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
443 summary_stats = TRUE | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
444 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
445 sink() | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
446 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
447 } else { | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
448 legend.col(col = rev(brewer.pal(n = 11, name = "RdYlGn")), lev = cut(contrasting_factor$factor, 11, label = FALSE)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
449 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
450 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
451 ## Clusters to which individual observations belong # used ? | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
452 # Clust <- data.frame(Cluster = res.hcpc$data.clust[, (nrow(data) + 1)], | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
453 # Observation = rownames(res.hcpc$data.clust)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
454 # metadata <- data.frame(Observation=colnames(data), row.names=colnames(data)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
455 # metadata = merge(y = metadata, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
456 # x = Clust, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
457 # by = "Observation") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
458 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
459 # unclear utility | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
460 # ObsNumberPerCluster = as.data.frame(table(metadata$Cluster)) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
461 # colnames(ObsNumberPerCluster) = c("Cluster", "ObsNumber") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
462 # | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
463 # ## Silhouette Plot # not used | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
464 # hc.cut = hcut(PCA_IndCoord, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
465 # k = nlevels(metadata$Cluster), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
466 # hc_method = "ward.D2") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
467 # | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
468 # Sil = fviz_silhouette(hc.cut) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
469 # sil1 = as.data.frame(Sil$data) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
470 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
471 dev.off() | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
472 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
473 if(opt$table_coordinates != ''){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
474 coord_table <- cbind(Cell=rownames(res.hcpc$call$X), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
475 round(as.data.frame(res.hcpc$call$X[, -length(res.hcpc$call$X)]), 6), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
476 as.data.frame(res.hcpc$call$X[, length(res.hcpc$call$X)]) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
477 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
478 colnames(coord_table)=c("Cells",paste0("DIM",(1:opt$HCPC_npc)),"Cluster") | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
479 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
480 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
481 if(opt$HCPC_clust != ""){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
482 res_clustering <- data.frame(Cell = rownames(res.hcpc$data.clust), | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
483 Cluster = res.hcpc$data.clust$clust) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
484 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
485 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
486 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
487 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
488 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
489 ## Return coordinates file to user | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
490 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
491 if(opt$table_coordinates != ''){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
492 write.table( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
493 coord_table, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
494 file = opt$table_coordinates, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
495 sep = "\t", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
496 quote = F, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
497 col.names = T, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
498 row.names = F | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
499 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
500 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
501 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
502 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
503 if(opt$HCPC_clust != ""){ | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
504 write.table( | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
505 res_clustering, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
506 file = opt$HCPC_clust, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
507 sep = "\t", | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
508 quote = F, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
509 col.names = T, | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
510 row.names = F | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
511 ) | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
512 } | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
513 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
514 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
515 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
516 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
517 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
518 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
519 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
520 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
521 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
522 | 
| 
 
241dd93219d7
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 1282ac9de7c926ab251f88afb2453f52c8b14200
 
artbio 
parents:  
diff
changeset
 | 
523 | 
