annotate high_dim_visu.R @ 2:7e7a2a4cfce2 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit e15ae06208ef1d3d42c0576ed28eb6ba10a36671
author artbio
date Tue, 25 Jun 2019 16:20:27 -0400
parents cad0001b9cfb
children 8e44c9e18a56
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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
1 # load packages that are provided in the conda env
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
2 options( show.error.messages=F,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
3 error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
4 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
5 requiredPackages = c('optparse', 'Rtsne', 'ggplot2', '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
6 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
7 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
8 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
9 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
10 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
11 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
12 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
13 library(RColorBrewer)
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
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
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
16 # Arguments
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
17 option_list = list(
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
18 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
19 "--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
20 default = NA,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
21 type = 'character',
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 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
23 ),
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 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
25 "--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
26 default = '\t',
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 type = 'character',
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 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
29 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
30 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
31 "--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
32 default = 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
33 type = 'logical',
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 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
35 ),
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 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
37 "--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
38 default = "res.tab",
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 type = 'character',
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 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
41 ),
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 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
43 "--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
44 default = 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
45 type = 'logical',
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 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
47 ),
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 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
49 "--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
50 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 type = 'character',
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 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
53 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
54 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
55 "--visu_choice",
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 default = '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
57 type = 'character',
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 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
59 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
60 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
61 "--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
62 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 type = 'character',
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 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
65 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
66 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
67 "--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
68 default = 42,
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 type = 'integer',
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 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
71 ),
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 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
73 "--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
74 default = 2,
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 type = 'integer',
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 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
77 ),
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 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
79 "--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
80 default = 50,
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 type = 'integer',
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 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
83 ),
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 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
85 "--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
86 default = 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
87 type = 'numeric',
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 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
89 ),
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 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
91 "--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
92 default = 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
93 type = 'numeric',
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 help = "theta [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
95 ),
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 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
97 "--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
98 default = 1000,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
99 type = 'integer',
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 help = "max_iter [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
101 ),
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 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
103 "--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
104 default = 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
105 type = 'logical',
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 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
107 ),
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 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
109 "--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
110 default = 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
111 type = 'logical',
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 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
113 ),
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 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
115 "--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
116 default = 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
117 type = 'logical',
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 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
119 ),
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 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
121 "--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
122 default = 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
123 type = 'logical',
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 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
125 ),
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 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
127 "--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
128 default = 12.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
129 type = 'numeric',
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 help = " Exaggeration factor used to multiply the P matrix in the first part of the optimization [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
131 ),
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 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
133 "--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
134 default = 5,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
135 type = 'integer',
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 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
137 ),
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 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
139 "--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
140 default = -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
141 type = 'numeric',
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
142 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
143 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
144 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
145 "--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
146 default = 5,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
147 type = 'integer',
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
148 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
149 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
150 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
151 "--HCPC_metric",
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
152 default = 'euclidian',
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
153 type = 'character',
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 help = "Metric to be used for calculating dissimilarities between observations, available 'euclidian' or 'manhattan' [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
155 ),
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 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
157 "--HCPC_method",
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 default = 'ward',
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 type = 'character',
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 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
161 ),
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 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
163 "--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
164 default = "out.pdf",
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 type = 'character',
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 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
167 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
168 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
169 "--HCPC_consol",
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
170 default = '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
171 type = 'logical',
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 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
173 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
174 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
175 "--HCPC_itermax",
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 default = '10',
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 type = 'integer',
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 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
179 ),
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 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
181 "--HCPC_min",
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 default = '3',
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 type = 'integer',
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 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
185 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
186 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
187 "--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
188 default = -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
189 type = 'integer',
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 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
191 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
192 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
193 "--HCPC_clusterCA",
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 default = 'rows',
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 type = 'character',
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 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
197 ),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
198 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
199 "--HCPC_kk",
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 default = -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
201 type = 'numeric',
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 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
203 )
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 )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
205
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 opt = parse_args(OptionParser(option_list = option_list),
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 args = commandArgs(trailingOnly = 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
208
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 if (opt$sep == "tab") {opt$sep <- "\t"}
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
210 if (opt$sep == "comma") {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
211 if(opt$HCPC_max == -1) {opt$HCPC_max <- NULL}
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 if(opt$HCPC_kk == -1) {opt$HCPC_kk <- Inf}
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 data = read.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
215 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
216 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
217 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
218 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
219 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
220 )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
221
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
222 # Contrasting factor and its colors
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
223 if (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
224 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
225 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
226 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
227 )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
228 rownames(contrasting_factor) <- contrasting_factor[,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
229 contrasting_factor <- contrasting_factor[colnames(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
230 colnames(contrasting_factor) <- c("id","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
231 contrasting_factor$factor <- as.factor(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
232 if(nlevels(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
233 colors_labels <- c("#E41A1C", "#377EB8")
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
234 } else {
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
235 colors_labels <- brewer.pal(nlevels(contrasting_factor$factor), name = 'Paired')
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
236 }
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
237 factorColors <-
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 with(contrasting_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
239 data.frame(factor = levels(contrasting_factor$factor),
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
240 color = I(colors_labels)
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
241 )
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 )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
243 factor_cols <- factorColors$color[match(contrasting_factor$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
244 factorColors$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
245 } 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
246 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
247 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
248
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
249 ################ t-SNE ####################
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
250 if (opt$visu_choice == 'tSNE') {
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
251 # filter and transpose df for tsne and 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
252 tdf = 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
253 # 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
254 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
255
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
256 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
257 dims = opt$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
258 initial_dims = opt$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
259 perplexity = opt$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
260 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
261 max_iter = opt$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
262 pca = opt$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
263 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
264 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
265 normalize = opt$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
266 exaggeration_factor=opt$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
267
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
268 embedding <- as.data.frame(tsne_out$Y[,1:2])
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
269 embedding$Class <- as.factor(rownames(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
270 gg_legend = theme(legend.position="right")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
271 if (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
272 ggplot(embedding, aes(x=V1, y=V2)) +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
273 geom_point(size=1, color='deepskyblue4') +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
274 gg_legend +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
275 xlab("") +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
276 ylab("") +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
277 ggtitle('t-SNE') +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
278 if (opt$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
279 geom_text(aes(label=Class),hjust=-0.2, vjust=-0.5, size=1.5, color='deepskyblue4')
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
280 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
281 } 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
282 embedding$factor <- as.factor(contrasting_factor$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
283 ggplot(embedding, aes(x=V1, y=V2, color=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
284 geom_point(size=1) + #, color=factor_cols
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
285 gg_legend +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
286 xlab("") +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
287 ylab("") +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
288 ggtitle('t-SNE') +
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
289 if (opt$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
290 geom_text(aes(label=Class, colour=factor),hjust=-0.2, vjust=-0.5, size=1.5)
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 }
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 }
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 ggsave(file=opt$pdf_out, device="pdf")
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
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 #save coordinates 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
296 if(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
297 coord_table <- cbind(rownames(tdf),as.data.frame(tsne_out$Y))
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 colnames(coord_table)=c("Cells",paste0("DIM",(1:opt$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
299 }
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 }
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
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
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 ######### make PCA with 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
304 if (opt$visu_choice == '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
305 pca <- PCA(t(data), ncp=opt$PCA_npc, 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
306 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
307 if (opt$labels == 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
308 plot(pca, label="none" , col.ind = factor_cols)
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
309 } 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
310 plot(pca, cex=0.2 , col.ind = factor_cols)
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
311 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
312 if (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
313 legend(x = 'topright',
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
314 legend = as.character(factorColors$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
315 col = factorColors$color, pch = 16, bty = 'n', xjust = 1, cex=0.7)
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
316 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
317 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
318
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
319 #save coordinates 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
320 if(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
321 coord_table <- cbind(rownames(pca$ind$coord),as.data.frame(pca$ind$coord))
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
322 colnames(coord_table)=c("Cells",paste0("DIM",(1:opt$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
323 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
324
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
325 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
326
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 ########### make HCPC with 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
328 if (opt$visu_choice == 'HCPC') {
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 # 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
331 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
332 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
333 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
334 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
335 scale.unit = 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
336 )
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 PCA_IndCoord = as.data.frame(pca$ind$coord) # coordinates of observations in 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
339
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
340 # Hierarchical Clustering On Principal Components Followed By Kmean Clustering
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
341 res.hcpc <- HCPC(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
342 nb.clust=opt$HCPC_ncluster, metric=opt$HCPC_metric, method=opt$HCPC_method,
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 graph=F,consol=opt$HCPC_consol,iter.max=opt$HCPC_itermax,min=opt$HCPC_min,max=opt$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
344 cluster.CA=opt$HCPC_clusterCA,kk=opt$HCPC_kk)
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 # HCPC plots
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 dims <- head(as.data.frame(res.hcpc$call$t$res$eig),2) # dims variances in column 2
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 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
348 plot(res.hcpc, choice="tree")
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 plot(res.hcpc, choice="bar")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
350 plot(res.hcpc, choice="3D.map")
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 if (opt$labels == 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
352 plot(res.hcpc, choice="map", label="none")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
353 } 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
354 plot(res.hcpc, choice="map")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
355 }
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
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
357 # user contrasts on the 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
358 if (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
359 plot(pca, label="none", habillage="ind", col.hab=factor_cols)
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 legend(x = 'topright',
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
361 legend = as.character(factorColors$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
362 col = factorColors$color, pch = 16, bty = 'n', xjust = 1, cex=0.7)
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 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
364 ## Clusters to which individual observations belong # used ?
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
365 # Clust <- data.frame(Cluster = res.hcpc$data.clust[, (nrow(data) + 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
366 # Observation = rownames(res.hcpc$data.clust))
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
367 # metadata <- data.frame(Observation=colnames(data), row.names=colnames(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
368 # metadata = merge(y = metadata,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
369 # x = Clust,
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
370 # by = "Observation")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
371
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 # unclear utility
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
373 # ObsNumberPerCluster = as.data.frame(table(metadata$Cluster))
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
374 # colnames(ObsNumberPerCluster) = c("Cluster", "ObsNumber")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
375 #
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 # ## Silhouette Plot # not used
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
377 # hc.cut = hcut(PCA_IndCoord,
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 # k = nlevels(metadata$Cluster),
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
379 # hc_method = "ward.D2")
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
380 #
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
381 # Sil = fviz_silhouette(hc.cut)
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 # sil1 = as.data.frame(Sil$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
383
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
384 ## Normalized Mutual Information # to be implemented later
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
385 # sink(opt$mutual_info)
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 # res = external_validation(
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 # as.numeric(factor(metadata[, Patient])),
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 # as.numeric(metadata$Cluster),
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 # method = "adjusted_rand_index",
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 # summary_stats = 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
391 # )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
392 # sink()
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 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
394
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
395 if(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
396 coord_table <- cbind(Cell=rownames(res.hcpc$call$X),as.data.frame(res.hcpc$call$X))
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
397 colnames(coord_table)=c("Cells",paste0("DIM",(1:opt$HCPC_npc)),"Cluster")
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 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
399 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
400
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
401 ## 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
402
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
403 if(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
404 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
405 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
406 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
407 sep = "\t",
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 quote = F,
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 col.names = T,
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 row.names = F
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
411 )
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
412 }
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
413
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
cad0001b9cfb planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/gsc_high_dimension_visualization commit 09dcd74dbc01f448518cf3db3e646afb0675a6fe
artbio
parents:
diff changeset
419
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
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
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
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
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
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