# HG changeset patch
# User bebatut
# Date 1461226873 14400
# Node ID 2a8acb4c0afcd60ce9b80ea05de4eb2bb0236a94
planemo upload for repository https://github.com/asaim/galaxytools/tree/master/tools/compute_wilcoxon_test commit 450b58f2de19b05cd05c27ae77376fb1b71f5646
diff -r 000000000000 -r 2a8acb4c0afc compute_wilcoxon_test.R
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compute_wilcoxon_test.R	Thu Apr 21 04:21:13 2016 -0400
@@ -0,0 +1,55 @@
+library('getopt')
+
+option_specification = matrix(c(
+  'input_file', 'a', 2, 'character',
+  'output_file', 'b', 2, 'character',
+  'column1_id', 'c', 2, 'integer',
+  'column2_id', 'd', 2, 'integer',
+  'alternative','e',2,'character',
+  'paired','f',2,'logical',
+  'exact','g',2,'logical',
+  'correct','h',2, 'logical',
+  'mu','i',2,'integer',
+  'header','y',2,'logical'
+), byrow=TRUE, ncol=4);
+
+options = getopt(option_specification);
+
+header = TRUE
+if(!is.null(options$header)) header = options$header
+
+data = read.table(options$input_file, sep = '\t', h = header)
+
+column1_id = 1
+if(!is.null(options$column1_id)) column1_id = options$column1_id
+x = data[,column1_id]
+y = NULL
+if(!is.null(options$column2_id)) y = data[,options$column2_id]
+
+alternative = 'two.sided'
+if(!is.null(options$alternative)) alternative = options$alternative
+
+mu = 0
+if(!is.null(options$mu)) mu = options$mu
+
+paired = FALSE
+if(!is.null(options$paired)) paired = options$paired
+
+exact = NULL
+if(!is.null(options$exact)) exact = options$exact
+
+correct = TRUE
+if(!is.null(options$correct)) correct = options$correct
+
+test = wilcox.test(x = x, y = y, alternative = alternative, mu = mu, 
+    paired = paired, exact = exact, correct = correct)
+
+m = matrix(ncol = 2, nrow = 6)
+m[1,] = c('statistic',test$statistic)
+m[2,] = c('parameter',test$parameter)
+m[3,] = c('p.value',test$p.value)
+m[4,] = c('null.value',test$null.value)
+m[5,] = c('alternative',test$alternative)
+m[6,] = c('method',test$method)
+write.table(m, file = options$output_file, sep = "\t", quote = FALSE, 
+    row.names = FALSE, col.names = FALSE)
diff -r 000000000000 -r 2a8acb4c0afc compute_wilcoxon_test.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compute_wilcoxon_test.xml	Thu Apr 21 04:21:13 2016 -0400
@@ -0,0 +1,94 @@
+
+    with R
+
+    
+        R
+        r-getopt
+    
+
+    
+        
+        
+    
+
+    
+
+    
+
+    
+        
+
+        
+  
+        
+
+        
+            
+                
+                
+            
+            
+                
+                
+            
+            
+        
+
+        
+            
+            
+            
+        
+        
+        
+        
+        
+    
+
+    
+        
+    
+
+    
+        
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+            
+        
+    
+
+    
+
+    
+    
+
diff -r 000000000000 -r 2a8acb4c0afc test-data/input_file.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/input_file.txt	Thu Apr 21 04:21:13 2016 -0400
@@ -0,0 +1,45 @@
+GO:0000160	phosphorelay signal transduction system	2.24188560912	0.728693934232	2.27727933683	0.749521959908
+GO:0000746	conjugation	0.0994837099605	0.041803266954	0.0153440543392	0.0123485894543
+GO:0000902	cell morphogenesis	8.11126977702e-06	0.0501066555955	4.12343924065e-05	0.0426587635694
+GO:0002376	immune system process	0.085489980287	0.0	0.0275218309404	0.00149679872174
+GO:0005975	carbohydrate metabolic process	3.93695964707	3.53466664758	3.82956086917	4.33023870198
+GO:0006091	generation of precursor metabolites and energy	1.07156623777	1.0906071495	1.17950701314	1.06085609403
+GO:0006259	DNA metabolic process	7.83088558928	5.06907560378	7.58396051319	4.27934754543
+GO:0006412	translation	4.20183364466	2.74183619419	5.03906963774	3.04486279969
+GO:0006520	cellular amino acid metabolic process	6.18101744575	3.82270833632	6.27139841544	3.78690076599
+GO:0006629	lipid metabolic process	2.22295409952	0.98294942091	2.54389716799	1.18920658442
+GO:0006790	sulfur compound metabolic process	1.45678041362	0.428626648151	1.37494525671	0.342766907277
+GO:0006807	nitrogen compound metabolic process	6.29928644413	17.1144292852	6.08311422603	15.9266867986
+GO:0006810	transport	4.61323317367	8.81648079483	3.18084754012	8.87713901893
+GO:0006811	ion transport	2.84530948465	1.81185666634	2.90259750702	1.89008258587
+GO:0006935	chemotaxis	0.00293746066557	0.132567894519	0.0120376618448	0.0841949280975
+GO:0006950	response to stress	1.94565920911	1.44736653735	2.0733055949	1.4305653783
+GO:0007154	cell communication	0.721015903582	1.15674793488	0.709743568009	1.18696138634
+GO:0007165	signal transduction	0.118779041384	1.12181643785	0.0745544227737	1.16488360519
+GO:0009056	catabolic process	2.8187943392	1.45624257348	2.98058889328	1.56752246133
+GO:0009058	biosynthetic process	19.0004196424	14.2414568152	19.1704185155	13.7907550227
+GO:0009117	nucleotide metabolic process	3.44391451912	1.42846917009	3.70529753166	1.38640981601
+GO:0009306	protein secretion	0.0636027918464	0.176375427696	0.0756710986973	0.150802471215
+GO:0009404	toxin metabolic process	0.03091092162	0.014316187313	0.0362106070805	0.0130969888151
+GO:0009405	pathogenesis	1.43460861083	0.541438204177	0.368367078771	0.122737495182
+GO:0015979	photosynthesis	0.232009822868	0.0798843252065	0.167653248687	0.0703495399215
+GO:0016032	viral process	0.00123963164065	0.0128845685817	0.00242960292976	0.0134711884956
+GO:0016043	cellular component organization	2.24641451781	0.697770969635	2.38025522473	0.654101041398
+GO:0016049	cell growth	0.000155245877721	0.0	0.0420673650671	0.0
+GO:0016070	RNA metabolic process	2.37121554921	5.80206439421	2.38215565603	5.74546189338
+GO:0016310	phosphorylation	2.50223255226	0.848090936421	1.9906050825	0.866646459884
+GO:0019538	protein metabolic process	2.25811799055	5.09713533092	1.9377105334	5.82741162339
+GO:0022900	electron transport chain	0.3062712212	0.360767920287	0.237876158003	0.278030362562
+GO:0030031	cell projection assembly	0.0642099836606	0.0355041445362	0.0413581109156	0.0142195878565
+GO:0032196	transposition	0.722175839172	0.299208314842	2.633467426	0.919782814506
+GO:0042592	homeostatic process	0.991966070514	0.362485862765	0.715433785162	0.325553721977
+GO:0043934	sporulation	0.0768001451434	0.0160341297906	0.0916709924953	0.00673559424781
+GO:0044281	small molecule metabolic process	6.91812462508	7.90797554796	7.74857313252	8.04978352548
+GO:0045333	cellular respiration	0.338287752671	0.686031696039	0.175606167551	0.522008554205
+GO:0046034	ATP metabolic process	1.36885696133	0.377661021316	1.37948961282	0.321811725173
+GO:0048870	cell motility	0.322410195844	0.136003779473	0.153352240024	0.0722205383237
+GO:0051186	cofactor metabolic process	4.61150014233	1.60312665531	4.55766657384	1.41821678885
+GO:0051301	cell division	1.32835952519	0.120828620922	1.26384039624	0.0942983194692
+GO:0055114	oxidation-reduction process	0.131832728405	7.08823066241	0.300772862677	7.94837541209
+GO:0071554	cell wall organization or biogenesis	0.00369855395882	0.456400051538	0.0153325835178	0.403387255508
+GO:0071941	nitrogen cycle metabolic process	0.5367849148	0.0612732816996	0.267403669367	0.0160905862586
diff -r 000000000000 -r 2a8acb4c0afc test-data/two_sided_two_columns_test_output.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/two_sided_two_columns_test_output.txt	Thu Apr 21 04:21:13 2016 -0400
@@ -0,0 +1,6 @@
+statistic	981
+parameter	parameter
+p.value	0.916918193979449
+null.value	0
+alternative	two.sided
+method	Wilcoxon rank sum test with continuity correction
diff -r 000000000000 -r 2a8acb4c0afc tool_dependencies.xml
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Thu Apr 21 04:21:13 2016 -0400
@@ -0,0 +1,9 @@
+
+
+    
+        
+    
+    
+        
+    
+