annotate t/golm_ws_LibrarySearch_test.t @ 3:28d579fa1718 draft default tip

Master branch Updating - - Fxx
author fgiacomoni
date Wed, 03 Oct 2018 05:35:16 -0400
parents e3d43b8c987b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
1 #! perl
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
2 use diagnostics;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
3 use warnings;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
4 no warnings qw/void/;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
5 use strict;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
6 no strict "refs" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
7 use Test::More qw( no_plan );
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
8 use FindBin ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
9 use Carp ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
10
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
11 ## Specific Modules
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
12 use lib $FindBin::Bin ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
13 my $binPath = $FindBin::Bin ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
14
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
15
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
16 use lib::golm_ws_api_test qw( :ALL ) ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
17
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
18 ## To launch the right sequence : API, MSP...
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
19 my $sequence = 'MSP' ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
20 my $current_test = 1 ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
21
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
22
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
23 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
24
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
25 ## START of API SEQUENCE ##
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
26
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
27 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
28
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
29
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
30 if ($sequence eq "API") {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
31
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
32 ## testing api module of golm wrapper.
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
33 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
34 print "\n\t\t\t * * * * * * \n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
35 print "\t * * * - - - Test Golm API module - - - * * * \n\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
36
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
37 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
38
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
39
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
40
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
41 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
42 # ARGS : $ws_url, $ws_proxy
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
43 # Structure of res : @ret = [ %val1, %val2, ... %valN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
44 print "\n** Test $current_test test_query_golm with default parameters **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
45 is_deeply( test_query_golmTest("http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx"),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
46 1,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
47 "Method \'test_query_golm\' Test Golm webservice with default spectrum");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
48
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
49 print "\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
50
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
51
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
52
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
53 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
54 # ARGS : $ws_url, $ws_proxy
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
55 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
56 print "\n** Test $current_test connectWSlibrarySearchGolm with real uri and proxy **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
57 isa_ok( connectWSlibrarySearchGolmTest("http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx"), 'SOAP::Lite' );
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
58
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
59
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
60
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
61 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
62 # ARGS : $ri, $riWindow, $gcColumn, $spectrum, $maxHits, $JaccardDistanceThreshold,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
63 # $s12GowerLegendreDistanceThreshold,$DotproductDistanceThreshold,$HammingDistanceThreshold,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
64 # $EuclideanDistanceThreshold,$ws_url, $ws_proxy,$default_ri, $default_ri_window, $default_gc_column
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
65 # Structure of res : @limited_hits = [ %val1, %val2, ... %valN ], @json_res = [ ojson1, ojson2,... ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
66 print "\n** Test $current_test LibrarySearch with a list of mzs, intensities and real search parameters **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
67 is_deeply(LibrarySearchTest(1898, 5, "VAR5", "70 3 71 3 72 16 73 999 74 87 75 78 76 4 77 5 81 1 82 6 83 13 84 4 85 3 86 4 87 5 88 4 89 52 90 4 91 2 97 2 98 1 99 4 100 12 101 16 102 9 103 116 104 11 105 26 106 2 107 1 111 1 112 1 113 4 114 11 115 7 116 5 117 93 118 9 119 8 126 1 127 3 128 3 129 101 130 19 131 25 132 4 133 60 134 8 135 4 140 1 141 1 142 4 143 13 144 2 145 6 146 1 147 276 148 44 149 27 150 3 151 1 156 1 157 70 158 12 159 5 160 148 161 26 162 7 163 8 164 1 168 1 169 2 170 1 172 3 173 4 174 1 175 4 177 4 186 2 187 1 189 28 190 7 191 13 192 2 193 1 201 5 202 1 203 3 204 23 205 162 206 31 207 16 208 2 210 2 214 1 215 2 216 8 217 88 218 18 219 8 220 1 221 6 222 1 229 23 230 6 231 11 232 3 233 4 234 3 235 1 243 1 244 2 245 1 246 2 247 1 256 1 262 3 263 1 269 2 270 1 274 4 275 1 277 4 278 1 291 7 292 2 293 1 300 1 305 4 306 1 307 4 308 1 318 1 319 122 320 37 321 17 322 3 323 1 343 1 364 2 365 1",
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
68 2, 0.9, 0.9, 0.5, 500, 0.5,"http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx",1500, 3000, "VAR5"),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
69
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
70 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
71 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
72 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
73 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
74 'analyteName' => 'Glucose (1MEOX) (5TMS) BP',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
75 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
76 'EuclideanDistance' => '0.00648652157',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
77 'HammingDistance' => 51,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
78 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
79 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
80 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
81 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
82 'DotproductDistance' => '0.00376573764',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
83 'JaccardDistance' => '0.2849162'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
84 },
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
85 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
86 'DotproductDistance' => '0.0041610254',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
87 'JaccardDistance' => '0.238709673',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
88 'ri' => '1897.25439',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
89 'spectrumID' => 'd00de57d-6fab-49d0-9aee-25e259da9180',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
90 's12GowerLegendreDistance' => '0.367506444',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
91 'riDiscrepancy' => '0.745605469',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
92 'analyteName' => 'Idose (1MEOX) (5TMS) BP',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
93 'spectrumName' => 'Idose (1MEOX) (5TMS) BP [A191005-ambient-na-1]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
94 'EuclideanDistance' => '0.007327365',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
95 'HammingDistance' => 37,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
96 'analyteID' => '6f4e926f-d7ef-47b6-a52c-91ff88ca567a',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
97 'metaboliteID' => 'ab025068-f464-4bc6-9c92-994c29387db2'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
98 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
99 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
100 ,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
101 "Method \'LibrarySearch\' returns a list of hits for a spectrum and parameters given in argument");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
102
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
103
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
104 print "\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
105
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
106 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
107 # ARGS : $ri, $riWindow, $gcColumn, $spectrum, $maxHits, $JaccardDistanceThreshold,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
108 # $s12GowerLegendreDistanceThreshold,$DotproductDistanceThreshold,$HammingDistanceThreshold,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
109 # $EuclideanDistanceThreshold,$ws_url, $ws_proxy,$default_ri, $default_ri_window, $default_gc_column
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
110 # Structure of res : @ret = [ %val1, %val2, ... %valN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
111 print "\n** Test $current_test BUG LibrarySearch with a list of mzs, intensities and empty spectrum **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
112 is_deeply(LibrarySearchTest(1898, 5, "VAR5", "", 2, 0.9, 0.9, 0.5, 500, 0.5,"http://gmd.mpimp-golm.mpg.de", "http://gmd.mpimp-golm.mpg.de/webservices/wsLibrarySearch.asmx",1500, 3000, "VAR5"),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
113 [],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
114 "Method \'LibrarySearch\' returns a list of hits for a spectrum and parameters given in argument");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
115
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
116 print "\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
117
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
118
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
119
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
120
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
121 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
122 # ARGS : $results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
123 # $DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
124 # Structure of res : @ret = [ %val1, %val2, ... %valN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
125
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
126 my $results = [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
127 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
128 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
129 'JaccardDistance' => '0.2849162',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
130 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
131 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
132 'EuclideanDistance' => '0.00648652157',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
133 'HammingDistance' => '51',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
134 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
135 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
136 'DotproductDistance' => '0.00376573671',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
137 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
138 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
139 'analyteName' => 'Glucose (1MEOX) (5TMS) BP'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
140 },
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
141 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
142 'analyteName' => 'Idose (1MEOX) (5TMS) BP',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
143 'spectrumName' => 'Idose (1MEOX) (5TMS) BP [A191005-ambient-na-3]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
144 'riDiscrepancy' => '0.745605469',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
145 'ri' => '1897.25439',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
146 'metaboliteID' => 'ab025068-f464-4bc6-9c92-994c29387db2',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
147 'JaccardDistance' => '0.835855663',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
148 's12GowerLegendreDistance' => '0.771266937',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
149 'DotproductDistance' => '0.0228821356',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
150 'HammingDistance' => '718',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
151 'EuclideanDistance' => '0.007299051',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
152 'analyteID' => '6f4e926f-d7ef-47b6-a52c-91ff88ca567a',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
153 'spectrumID' => '274f5578-3087-4c10-8a6c-6ffa6eb4bd6c'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
154 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
155 ] ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
156 print "\n** Test $current_test filter_scores_golm_results with results and thresholds **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
157 is_deeply(filter_scores_golm_resultsTest($results, 0.9, 0.9, 0.5, 500, 0.5),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
158 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
159 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
160 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
161 'DotproductDistance' => '0.00376573671',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
162 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
163 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
164 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
165 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
166 'analyteName' => 'Glucose (1MEOX) (5TMS) BP',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
167 'HammingDistance' => 51,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
168 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
169 'JaccardDistance' => '0.2849162',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
170 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
171 'EuclideanDistance' => '0.00648652157'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
172 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
173 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
174 "Method \'filter_scores_golm_results\' returns results wich have distance scores under thresholds");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
175
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
176 print "\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
177
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
178
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
179
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
180 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
181 # ARGS : $results,$JaccardDistanceThreshold,$s12GowerLegendreDistanceThreshold,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
182 # $DotproductDistanceThreshold,$HammingDistanceThreshold,$EuclideanDistanceThreshold
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
183 # Structure of res : @ret = [ %val1, %val2, ... %valN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
184
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
185 $results = [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
186 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
187 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
188 'JaccardDistance' => '0.9849162',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
189 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
190 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
191 'EuclideanDistance' => '0.00648652157',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
192 'HammingDistance' => '51',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
193 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
194 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
195 'DotproductDistance' => '0.00376573671',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
196 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
197 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
198 'analyteName' => 'Glucose (1MEOX) (5TMS) BP'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
199 },
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
200 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
201 'analyteName' => 'Idose (1MEOX) (5TMS) BP',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
202 'spectrumName' => 'Idose (1MEOX) (5TMS) BP [A191005-ambient-na-3]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
203 'riDiscrepancy' => '0.745605469',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
204 'ri' => '1897.25439',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
205 'metaboliteID' => 'ab025068-f464-4bc6-9c92-994c29387db2',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
206 'JaccardDistance' => '0.835855663',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
207 's12GowerLegendreDistance' => '0.771266937',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
208 'DotproductDistance' => '0.0228821356',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
209 'HammingDistance' => '718',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
210 'EuclideanDistance' => '0.007299051',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
211 'analyteID' => '6f4e926f-d7ef-47b6-a52c-91ff88ca567a',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
212 'spectrumID' => '274f5578-3087-4c10-8a6c-6ffa6eb4bd6c'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
213 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
214 ] ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
215
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
216 print "\n** Test $current_test filter_scores_golm_results with results having too high distance scores **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
217 is_deeply(filter_scores_golm_resultsTest($results, 0.9, 0.9, 0.5, 500, 0.5),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
218 [],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
219 "Method \'filter_scores_golm_results\' returns results wich have distance scores under thresholds");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
220
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
221 print "\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
222
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
223
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
224
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
225 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
226 # ARGS : $results
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
227 # Structure of res : @ret = [ %val1, %val2, ... %valN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
228
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
229 $results = [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
230 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
231 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
232 'JaccardDistance' => '0.9849162',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
233 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
234 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
235 'EuclideanDistance' => '0.00648652157',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
236 'HammingDistance' => '51',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
237 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
238 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
239 'DotproductDistance' => '0.00376573671',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
240 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
241 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
242 'analyteName' => 'Glucose (1MEOX) (5TMS) BP'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
243 },
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
244 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
245 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
246 'JaccardDistance' => '0.9849162',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
247 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
248 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
249 'EuclideanDistance' => '0.00648652157',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
250 'HammingDistance' => '51',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
251 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
252 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
253 'DotproductDistance' => '0.07376573671',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
254 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
255 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
256 'analyteName' => 'Glucose (1MEOX) (5TMS) BP'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
257 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
258 ] ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
259
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
260 print "\n** Test $current_test filter_replica_results with real parameters **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
261 is_deeply(filter_replica_resultsTest($results),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
262 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
263 {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
264 's12GowerLegendreDistance' => '0.404159725',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
265 'JaccardDistance' => '0.9849162',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
266 'ri' => '1899.05493',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
267 'metaboliteID' => '68513255-fc44-4041-bc4b-4fd2fae7541d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
268 'EuclideanDistance' => '0.00648652157',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
269 'HammingDistance' => '51',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
270 'analyteID' => '0a2b3536-2245-4c0e-bdbc-495766eeec67',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
271 'spectrumID' => 'dd5bb721-ce4f-4cec-99ff-de2cb818304d',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
272 'DotproductDistance' => '0.00376573671',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
273 'riDiscrepancy' => '1.054953',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
274 'spectrumName' => 'Glucose (1MEOX) (5TMS) BP [A191001-ambient-na-23]',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
275 'analyteName' => 'Glucose (1MEOX) (5TMS) BP'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
276 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
277 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
278 "Method \'filter_replica_results\' returns results with unique spectra with lowest dotproduct");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
279
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
280 print "\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
281
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
282
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
283
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
284
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
285 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
286
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
287
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
288 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
289
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
290 ## START of MSP SEQUENCE ##
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
291
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
292 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
293
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
294
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
295 elsif ($sequence eq "MSP") {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
296
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
297 ## testing msp module of golm wrapper.
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
298 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
299 print "\n\t\t\t * * * * * * \n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
300 print "\t * * * - - - Test MSP parsing module - - - * * * \n\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
301
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
302 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
303
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
304
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
305 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
306 # ARGS : $msp_file, $mzRes
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
307 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
308 print "\n** Test $current_test get_mzs from a .msp file normal parameters **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
309 is_deeply( get_mzsTest('./data/inputSpectra_unit_test.msp',0),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
310 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
311 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
312 73,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
313 74,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
314 75,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
315 100,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
316 103,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
317 116,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
318 117,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
319 118,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
320 128,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
321 131,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
322 133,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
323 147,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
324 48,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
325 149,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
326 190,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
327 191,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
328 192,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
329 207,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
330 218
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
331 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
332 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
333 "Method \'get_mzs\' return an array of arrays refs containing mzs of all the spectra from a msp file");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
334
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
335
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
336
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
337
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
338 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
339 # ARGS : $msp_file, $mzRes
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
340 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
341 print "\n** Test $current_test get_mzs from a .msp file: specific mzRes **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
342 is_deeply( get_mzsTest('./data/inputSpectra_unit_test.msp',2),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
343 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
344 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
345 '73.05',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
346 '74.05',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
347 '75.03',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
348 '100.06',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
349 '103.02',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
350 '116.09',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
351 '117.09',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
352 '118.09',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
353 '128.05',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
354 '131.04',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
355 '133.04',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
356 '147.07',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
357 '48.07',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
358 '149.06',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
359 '190.11',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
360 '191.11',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
361 '192.10',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
362 '207.03',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
363 '218.10'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
364 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
365 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
366 "Method \'get_mzs\' return an array of arrays refs containing mzs of all the spectra from a msp file ");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
367
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
368
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
369
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
370
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
371 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
372 # ARGS : $msp_file, $mzRes
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
373 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
374 print "\n** Test $current_test get_mzs from a .msp file: too big mzRes **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
375 is_deeply( get_mzsTest('./data/inputSpectra_unit_test.msp',10),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
376 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
377 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
378 '73.0465000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
379 '74.0481000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
380 '75.0319000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
381 '100.0573000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
382 '103.0227000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
383 '116.0884000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
384 '117.0905000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
385 '118.0869000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
386 '128.0526000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
387 '131.0359000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
388 '133.0438000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
389 '147.0666000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
390 '48.0660000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
391 '149.0551000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
392 '190.1069000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
393 '191.1063000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
394 '192.1023000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
395 '207.0333000000',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
396 '218.1028000000'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
397 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
398 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
399 "Method \'get_mzs\' return an array of arrays refs containing mzs of all the spectra from a msp file ");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
400
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
401
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
402
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
403
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
404
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
405 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
406 # ARGS : $msp_file
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
407 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
408 print "\n** Test $current_test get_intensities from a .msp file **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
409 is_deeply(get_intensitiesTest('./data/inputSpectra_unit_test.msp'),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
410 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
411 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
412 '826983.38',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
413 '70018.08',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
414 '69475.73',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
415 '37477.24',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
416 '43054.28',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
417 '1433179.62',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
418 '151975.23',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
419 '53105.64',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
420 '26404.77',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
421 '22647.44',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
422 '22141.56',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
423 '255488.28',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
424 '49965.66',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
425 '37762.38',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
426 '72568.23',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
427 '18017.34',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
428 '6460.8',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
429 '35435.81',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
430 '30528.82'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
431 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
432 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
433 "Method \'get_mzs\' return an array of arrays refs containing mzs of all the spectra from a msp file");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
434
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
435
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
436
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
437
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
438
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
439 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
440 # ARGS : $inputSpectra,$mzRes
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
441 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
442 print "\n** Test $current_test get_masses_from_stringTest from string of mzs and intensities **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
443 is_deeply(get_masses_from_stringTest('70 3 71 3 72 16 73 999 74 87 75 78 76 4 77 5 81 1 82 6 83 13 84 4 85 3 86 4 87 5 88 4 89 52 90 4 91 2 97 2 98 1 99 4 100
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
444 12 101 16 102 9 103 116 104 11 105 26 106 2 107 1 111 1 112 1 113 4 114 11 115 7 116 5 117 93 118 9 119 8 126 1 127 3 128 3 129 101 130 19 131 25 132 4 133 60 134 8 135 4 140
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
445 1 141 1 142 4 143 13 144 2 145 6 146 1 147 276 148 44 149 27 150 3 151 1 156 1 157 70 158 12 159 5 160 148 161 26 162 7 163 8 164 1 168 1 169 2 170 1 172 3 173 4 174 1 175 4
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
446 177 4 186 2 187 1 189 28 190 7 191 13 192 2 193 1 201 5 202 1 203 3 204 23 205 162 206 31 207 16 208 2 210 2 214 1 215 2 216 8 217 88 218 18 219 8 220 1 221 6 222 1 229 23
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
447 230 6 231 11 232 3 233 4 234 3 235 1 243 1 244 2 245 1 246 2 247 1 256 1 262 3 263 1 269 2 270 1 274 4 275 1 277 4 278 1 291 7 292 2 293 1 300 1 305 4 306 1 307 4 308 1 318
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
448 1 319 122 320 37 321 17 322 3 323 1 343 1 364 2 365 1', 0),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
449 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
450 '70', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '97', '98', '99', '100', '101', '102', '103', '104', '105', '106', '107', '111', '112', '113', '114', '115', '116', '117', '118', '119', '126', '127', '128', '129', '130', '131', '132', '133', '134', '135', '140', '141', '142', '143', '144', '145', '146', '147', '148', '149', '150', '151', '156', '157', '158', '159', '160', '161', '162', '163', '164', '168', '169', '170', '172', '173', '174', '175', '177', '186', '187', '189', '190', '191', '192', '193', '201', '202', '203', '204', '205', '206', '207', '208', '210', '214', '215', '216', '217', '218', '219', '220', '221', '222', '229', '230', '231', '232', '233', '234', '235', '243', '244', '245', '246', '247', '256', '262', '263', '269', '270', '274', '275', '277', '278', '291', '292', '293', '300', '305', '306', '307', '308', '318', '319', '320', '321', '322', '323', '343', '364', '365'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
451 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
452 "Method \'get_masses_from_stringTest\' return an array containing all masses from a string");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
453
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
454
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
455
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
456
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
457 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
458 # ARGS : $inputSpectra
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
459 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
460 print "\n** Test $current_test get_intensities_from_stringTest from string of mzs and intensities **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
461 is_deeply(get_intensities_from_stringTest("70 3 71 3 72 16 73 999 74 87 75 78 76 4 77 5 81 1 82 6 83 13 84 4 85 3 86 4 87 5 88 4 89 52 90 4 91 2 97 2 98 1 99 4 100
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
462 12 101 16 102 9 103 116 104 11 105 26 106 2 107 1 111 1 112 1 113 4 114 11 115 7 116 5 117 93 118 9 119 8 126 1 127 3 128 3 129 101 130 19 131 25 132 4 133 60 134 8 135 4 140
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
463 1 141 1 142 4 143 13 144 2 145 6 146 1 147 276 148 44 149 27 150 3 151 1 156 1 157 70 158 12 159 5 160 148 161 26 162 7 163 8 164 1 168 1 169 2 170 1 172 3 173 4 174 1 175 4
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
464 177 4 186 2 187 1 189 28 190 7 191 13 192 2 193 1 201 5 202 1 203 3 204 23 205 162 206 31 207 16 208 2 210 2 214 1 215 2 216 8 217 88 218 18 219 8 220 1 221 6 222 1 229 23
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
465 230 6 231 11 232 3 233 4 234 3 235 1 243 1 244 2 245 1 246 2 247 1 256 1 262 3 263 1 269 2 270 1 274 4 275 1 277 4 278 1 291 7 292 2 293 1 300 1 305 4 306 1 307 4 308 1 318
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
466 1 319 122 320 37 321 17 322 3 323 1 343 1 364 2 365 1"),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
467 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
468 '3', '3', '16', '999', '87', '78', '4', '5', '1', '6', '13', '4', '3', '4', '5', '4', '52', '4', '2', '2', '1', '4', '12', '16', '9', '116', '11', '26', '2', '1', '1', '1', '4', '11', '7', '5', '93', '9', '8', '1', '3', '3', '101', '19', '25', '4', '60', '8', '4', '1', '1', '4', '13', '2', '6', '1', '276', '44', '27', '3', '1', '1', '70', '12', '5', '148', '26', '7', '8', '1', '1', '2', '1', '3', '4', '1', '4', '4', '2', '1', '28', '7', '13', '2', '1', '5', '1', '3', '23', '162', '31', '16', '2', '2', '1', '2', '8', '88', '18', '8', '1', '6', '1', '23', '6', '11', '3', '4', '3', '1', '1', '2', '1', '2', '1', '1', '3', '1', '2', '1', '4', '1', '4', '1', '7', '2', '1', '1', '4', '1', '4', '1', '1', '122', '37', '17', '3', '1', '1', '2', '1'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
469 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
470 "Method \'get_intensities_from_stringTest\' return an array containing all intensities from a string");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
471
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
472
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
473
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
474
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
475
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
476 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
477 # ARGS : $mzs,$intensities
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
478 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
479 print "\n** Test $current_test encode_spectrum_for_query from mzs and intensities arrays **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
480
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
481 my $mzs = [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
482 [73,147,157,160,205,217,272,319,320],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
483 [73,129,147,157,160,205,217,319,320]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
484 ] ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
485
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
486 my $intensities = [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
487 [5764652,5244020,3561241,3454586,4437872,3601276,30900.41,5352581,3587208],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
488 [5551756,3361335,5231997,3641748,3947240,4374348,3683153,5377373,3621938]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
489 ];
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
490
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
491 is_deeply(encode_spectrum_for_queryTest($mzs,$intensities),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
492 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
493 '73 5764652 147 5244020 157 3561241 160 3454586 205 4437872 217 3601276 272 30900.41 319 5352581 320 3587208 ',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
494 '73 5551756 129 3361335 147 5231997 157 3641748 160 3947240 205 4374348 217 3683153 319 5377373 320 3621938 ',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
495 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
496 "Method \'encode_spectrum_for_query\' return an array containing WS formatted spectrum strings");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
497
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
498
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
499
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
500
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
501 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
502 # ARGS : $mzs,$intensities
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
503 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
504 print "\n** Test $current_test encode_spectrum_for_query from empty mzs and intensities arrays **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
505
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
506 $mzs = [] ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
507
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
508 $intensities = [];
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
509
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
510 is_deeply(encode_spectrum_for_queryTest($mzs,$intensities),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
511 [],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
512 "Method \'encode_spectrum_for_query\' return an array containing WS formatted spectrum strings");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
513
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
514
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
515
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
516 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
517 # ARGS : $mzs,$intensities
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
518 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
519 print "\n** Test $current_test encode_spectrum_for_query from undef mzs and intensities arrays **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
520 is_deeply(encode_spectrum_for_queryTest(undef,undef),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
521 [],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
522 "Method \'encode_spectrum_for_query\' return an array containing WS formatted spectrum strings");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
523
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
524
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
525
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
526
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
527 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
528 # ARGS : $mzs_res_sorted, $maxIons
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
529 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
530 print "\n** Test $current_test keep_only_max_masses from mzs arrays according to a max ions given in argument **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
531 is_deeply(keep_only_max_massesTest(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
532 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
533 '73', '147', '205', '160', '319', '103', '129', '117', '217', '74', '75', '157', '133', '89', '148', '320', '206', '189', '149', '105', '161', '131', '204', '229', '130', '218', '321', '72', '101', '207', '83', '143', '191', '100', '158', '104', '114', '231', '102', '118', '119', '134', '163', '216', '219', '115', '162', '190', '291', '82', '145', '221', '230', '77', '87', '116', '159', '201', '76', '84', '86', '88', '90', '99', '113', '132', '135', '142', '173', '175', '177', '233', '274', '277', '305', '307', '70', '71', '85', '127', '128', '150', '172', '203', '232', '234', '262', '322', '91', '97', '106', '144', '169', '186', '192', '208', '210', '215', '244', '246', '269', '292', '364', '81', '98', '107', '111', '112', '126', '140', '141', '146', '151', '156', '164', '168', '170', '174', '187', '193', '202', '214', '220', '222', '235', '243', '245', '247', '256', '263', '270', '275', '278', '293', '300', '306', '308', '318', '323', '343', '365'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
534 ], 2),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
535 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
536 '73',
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
537 '147'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
538 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
539 "Method \'keep_only_max_masses\' return an array containing the number of masses to send to Golm");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
540
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
541
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
542
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
543 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
544 # ARGS : $mzs_res_sorted, $maxIons
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
545 # Structure of res: [ $arr_ref1 , $arr_ref2 ... $arr_refN ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
546 print "\n** Test $current_test keep_only_max_intensities from intensity arrays according to a max ions given in argument **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
547 is_deeply(keep_only_max_intensitiesTest(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
548 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
549 999,276,162,148,122,116,101,93,88,87,78,70,60,52,44,37,31,28,27,26,26,25,23,23,19,18,17,16,16,16,13,13,13,12,12,11,11,11,9,9,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
550 ], 2),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
551 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
552 999,
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
553 276
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
554 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
555 "Method \'keep_only_max_intensities\' return an array containing the number of intensities to send to Golm");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
556
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
557
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
558
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
559 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
560 # ARGS : $ref_mzs_res, $ref_ints_res
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
561 # Structure of res: [ mz1,mz2,... ] , [ int1,int2,... ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
562 print "\n** Test $current_test sorting_descending_intensities sort mzs and intensities arrays by descending intensity values **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
563 is_deeply(sorting_descending_intensities1Test(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
564 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
565 '70','71','72','73','74','75','76','77','81','82','83','84','85','86','87','88','89','90','91','97','98','99','100','101','102','103','104','105','106','107','111','112','113','114','115','116','117','118','119','126','127','128','129','130','131','132','133','134','135','140','141','142','143','144','145','146','147','148','149','150','151','156','157','158','159','160','161','162','163','164','168','169','170','172','173','174','175','177','186','187','189','190','191','192','193','201','202','203','204','205','206','207','208','210','214','215','216','217','218','219','220','221','222','229','230','231','232','233','234','235','243','244','245','246','247','256','262','263','269','270','274','275','277','278','291','292','293','300','305','306','307','308','318','319','320','321','322','323','343','364','365'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
566 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
567 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
568 '3','3','16','999','87','78','4','5','1','6','13','4','3','4','5','4','52','4','2','2','1','4','12','16','9','116','11','26','2','1','1','1','4','11','7','5','93','9','8','1','3','3','101','19','25','4','60','8','4','1','1','4','13','2','6','1','276','44','27','3','1','1','70','12','5','148','26','7','8','1','1','2','1','3','4','1','4','4','2','1','28','7','13','2','1','5','1','3','23','162','31','16','2','2','1','2','8','88','18','8','1','6','1','23','6','11','3','4','3','1','1','2','1','2','1','1','3','1','2','1','4','1','4','1','7','2','1','1','4','1','4','1','1','122','37','17','3','1','1','2','1'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
569 ]),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
570 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
571 '73','147','205','160','319','103','129','117','217','74','75','157','133','89','148','320','206','189','149','105','161','131','204','229','130','218','321','72','101','207','83','143','191','100','158','104','114','231','102','118','119','134','163','216','219','115','162','190','291','82','145','221','230','77','87','116','159','201','76','84','86','88','90','99','113','132','135','142','173','175','177','233','274','277','305','307','70','71','85','127','128','150','172','203','232','234','262','322','91','97','106','144','169','186','192','208','210','215','244','246','269','292','364','81','98','107','111','112','126','140','141','146','151','156','164','168','170','174','187','193','202','214','220','222','235','243','245','247','256','263','270','275','278','293','300','306','308','318','323','343','365'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
572 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
573 "Method \'sorting_descending_intensities\' return the arrays of mz sorted accordingly to the rearrangment of the ints array");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
574
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
575
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
576
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
577
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
578 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
579 # ARGS : $ref_mzs_res, $ref_ints_res
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
580 # Structure of res: [ mz1,mz2,... ] , [ int1,int2,... ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
581 print "\n** Test $current_test sorting_descending_intensities sort mzs and intensities arrays by descending intensity values **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
582 is_deeply(sorting_descending_intensities2Test(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
583 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
584 '70','71','72','73','74','75','76','77','81','82','83','84','85','86','87','88','89','90','91','97','98','99','100','101','102','103','104','105','106','107','111','112','113','114','115','116','117','118','119','126','127','128','129','130','131','132','133','134','135','140','141','142','143','144','145','146','147','148','149','150','151','156','157','158','159','160','161','162','163','164','168','169','170','172','173','174','175','177','186','187','189','190','191','192','193','201','202','203','204','205','206','207','208','210','214','215','216','217','218','219','220','221','222','229','230','231','232','233','234','235','243','244','245','246','247','256','262','263','269','270','274','275','277','278','291','292','293','300','305','306','307','308','318','319','320','321','322','323','343','364','365'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
585 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
586 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
587 '3','3','16','999','87','78','4','5','1','6','13','4','3','4','5','4','52','4','2','2','1','4','12','16','9','116','11','26','2','1','1','1','4','11','7','5','93','9','8','1','3','3','101','19','25','4','60','8','4','1','1','4','13','2','6','1','276','44','27','3','1','1','70','12','5','148','26','7','8','1','1','2','1','3','4','1','4','4','2','1','28','7','13','2','1','5','1','3','23','162','31','16','2','2','1','2','8','88','18','8','1','6','1','23','6','11','3','4','3','1','1','2','1','2','1','1','3','1','2','1','4','1','4','1','7','2','1','1','4','1','4','1','1','122','37','17','3','1','1','2','1'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
588 ]),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
589 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
590 999,276,162,148,122,116,101,93,88,87,78,70,60,52,44,37,31,28,27,26,26,25,23,23,19,18,17,16,16,16,13,13,13,12,12,11,11,11,9,9,8,8,8,8,8,7,7,7,7,6,6,6,6,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
591 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
592 "Method \'sorting_descending_intensities\' return the arrays of ints sorted by descending intensity values");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
593
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
594
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
595
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
596 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
597 # ARGS : $ref_mzs_res, $ref_ints_res
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
598 # Structure of res: [ mz1,mz2,... ] , [ int1,int2,... ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
599 print "\n** Test $current_test sorting_descending_intensities remove redundant masses **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
600 is_deeply(remove_redundants1Test(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
601 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
602 '70','71','71','73'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
603 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
604 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
605 '147','259','276','45'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
606 ]),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
607 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
608 '70','71','73'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
609 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
610 "Method \'sorting_descending_intensities\' return the arrays of masses of non redundant ions");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
611
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
612
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
613
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
614 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
615 # ARGS : $ref_mzs_res, $ref_ints_res
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
616 # Structure of res: [ mz1,mz2,... ] , [ int1,int2,... ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
617 print "\n** Test $current_test sorting_descending_intensities remove redundant masses **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
618 is_deeply(remove_redundants2Test(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
619 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
620 '70','71','71','73'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
621 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
622 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
623 '147','259','276','45'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
624 ]),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
625 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
626 '147','276','45'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
627 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
628 "Method \'sorting_descending_intensities\' return the arrays of ints of non redundant ions");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
629
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
630
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
631
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
632 ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
633 # ARGS : $uniq_total_intensities
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
634 # Structure of res: [ [int1,int2,...] , ... ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
635 print "\n** Test $current_test apply_relative_intensity make intensities to relative **\n" ; $current_test++;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
636 is_deeply(apply_relative_intensityTest(
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
637 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
638 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
639 '1433179.62','826983.38','255488.28','151975.23','72568.23','70018.08','69475.73','53105.64','49965.66','43054.28','37762.38','37477.24','35435.81','30528.82','26404.77','22647.44','22141.56','18017.34','6460.8'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
640 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
641 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
642 ),
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
643 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
644 [
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
645 '100','57.7027030289476','17.8266754867753','10.6040602224025','5.063442780466','4.88550625636164','4.84766382597598','3.7054420296599','3.48635016174735','3.00410914299772','2.63486721922546','2.61497159720985','2.47253097277507','2.13014611525107','1.84239083723504','1.58022341958784','1.54492568070428','1.25715854095106','0.450801833199386'
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
646 ]
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
647 ],
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
648 "Method \'apply_relative_intensity\' return the arrays of relativ intensities");
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
649
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
650
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
651
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
652 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
653 else {
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
654 croak "Can\'t launch any test : no sequence clearly defined !!!!\n" ;
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
655 }
e3d43b8c987b Init repository with last tool-bank-golm-lib_search master version
fgiacomoni
parents:
diff changeset
656