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