comparison t/hmdb_managerTest.pl @ 9:c32280662103 draft

Master branch Updating - - Fxx
author fgiacomoni
date Wed, 19 Sep 2018 11:09:30 -0400
parents 6091a80df951
children 4eb2de7c24d1
comparison
equal deleted inserted replaced
8:97788e4bf3fc 9:c32280662103
128 128
129 print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a void mz list **\n" ; $current_test++; 129 print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a void mz list **\n" ; $current_test++;
130 is_deeply ( parse_hmdb_csv_resultsTest ( [], [] ), 130 is_deeply ( parse_hmdb_csv_resultsTest ( [], [] ),
131 [], 131 [],
132 'Method \'parse_hmdb_csv_results\' works with a empty csv output/mz list and returns an empty but well formatted array' ) ; 132 'Method \'parse_hmdb_csv_results\' works with a empty csv output/mz list and returns an empty but well formatted array' ) ;
133
134 ## Other example... from mz 265.0567515
135 print "\n** Test $current_test parse_hmdb_csv_results with mz 265.0567515 and the correct inputs for hmdb outputs parsing (csv format) **\n" ; $current_test++;
136 is_deeply ( parse_hmdb_csv_resultsTest (
137 [
138 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)',
139 '265.0567515,HMDB0059667,3-Methylsulfolene,n/a,C5H8O2S,132.02450019,2M+H,+,265.056276,2',
140 '265.0567515,HMDB0038767,Camelliaside b,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
141 '265.0567515,HMDB0039759,Kaempferol 3-(2g-apiosylrobinobioside),n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
142 '265.0567515,HMDB0040875,Isoschaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
143 '265.0567515,HMDB0040878,Schaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2',
144 '265.0567515,HMDB0059600,erythro-5-Phosphonooxy-L-lysine,C03366,C6H15N2O6P,242.066772734,M+Na,+,265.055991,3',
145 '265.0567515,HMDB0061174,"2,4-Imidazolidinedione, 3-ethyl-5-(4-hydroxyphenyl)-",n/a,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3',
146 '265.0567515,HMDB0015571,Oxitriptan,C00643,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3',
147 '265.0567515,HMDB0000472,5-hydroxy-l-tryptophan,C01017,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3',
148 '265.0567515,HMDB0030584,Silidianin,n/a,C25H24O10,484.136946988,M+2Na,+,265.057691,4',
149 ],
150 ['265.0567515'],
151 5
152 ),
153 [
154 [
155 {
156 'ENTRY_DELTA' => '2',
157 'ENTRY_FORMULA' => 'C5H8O2S',
158 'ENTRY_ENTRY_ID' => 'HMDB0059667',
159 'ENTRY_ADDUCT_MZ' => '265.056276',
160 'ENTRY_ADDUCT_TYPE' => '+',
161 'ENTRY_CPD_MZ' => '132.02450019',
162 'ENTRY_ADDUCT' => '2M+H'
163 },
164 {
165 'ENTRY_ADDUCT_MZ' => '265.056128',
166 'ENTRY_ENTRY_ID' => 'HMDB0038767',
167 'ENTRY_ADDUCT_TYPE' => '+',
168 'ENTRY_CPD_MZ' => '726.200729034',
169 'ENTRY_ADDUCT' => 'M+3Na',
170 'ENTRY_DELTA' => '2',
171 'ENTRY_FORMULA' => 'C32H38O19'
172 },
173 {
174 'ENTRY_DELTA' => '2',
175 'ENTRY_FORMULA' => 'C32H38O19',
176 'ENTRY_ENTRY_ID' => 'HMDB0039759',
177 'ENTRY_ADDUCT_MZ' => '265.056128',
178 'ENTRY_ADDUCT_TYPE' => '+',
179 'ENTRY_CPD_MZ' => '726.200729034',
180 'ENTRY_ADDUCT' => 'M+3Na'
181 },
182 {
183 'ENTRY_FORMULA' => 'C32H38O19',
184 'ENTRY_DELTA' => '2',
185 'ENTRY_ADDUCT_TYPE' => '+',
186 'ENTRY_ADDUCT_MZ' => '265.056128',
187 'ENTRY_ENTRY_ID' => 'HMDB0040875',
188 'ENTRY_CPD_MZ' => '726.200729034',
189 'ENTRY_ADDUCT' => 'M+3Na'
190 },
191 {
192 'ENTRY_ADDUCT_TYPE' => '+',
193 'ENTRY_ENTRY_ID' => 'HMDB0040878',
194 'ENTRY_ADDUCT_MZ' => '265.056128',
195 'ENTRY_ADDUCT' => 'M+3Na',
196 'ENTRY_CPD_MZ' => '726.200729034',
197 'ENTRY_FORMULA' => 'C32H38O19',
198 'ENTRY_DELTA' => '2'
199 }
200 ]
201 ],
202 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ;
203
204
133 } 205 }
134 206
135 207
136 208
137 209