Mercurial > repos > fgiacomoni > hmdb_ms_search
diff 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 |
line wrap: on
line diff
--- a/t/hmdb_managerTest.pl Sat Jan 20 17:36:51 2018 -0500 +++ b/t/hmdb_managerTest.pl Wed Sep 19 11:09:30 2018 -0400 @@ -130,6 +130,78 @@ is_deeply ( parse_hmdb_csv_resultsTest ( [], [] ), [], 'Method \'parse_hmdb_csv_results\' works with a empty csv output/mz list and returns an empty but well formatted array' ) ; + + ## Other example... from mz 265.0567515 + 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++; + is_deeply ( parse_hmdb_csv_resultsTest ( + [ + 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)', + '265.0567515,HMDB0059667,3-Methylsulfolene,n/a,C5H8O2S,132.02450019,2M+H,+,265.056276,2', + '265.0567515,HMDB0038767,Camelliaside b,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', + '265.0567515,HMDB0039759,Kaempferol 3-(2g-apiosylrobinobioside),n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', + '265.0567515,HMDB0040875,Isoschaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', + '265.0567515,HMDB0040878,Schaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', + '265.0567515,HMDB0059600,erythro-5-Phosphonooxy-L-lysine,C03366,C6H15N2O6P,242.066772734,M+Na,+,265.055991,3', + '265.0567515,HMDB0061174,"2,4-Imidazolidinedione, 3-ethyl-5-(4-hydroxyphenyl)-",n/a,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', + '265.0567515,HMDB0015571,Oxitriptan,C00643,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', + '265.0567515,HMDB0000472,5-hydroxy-l-tryptophan,C01017,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', + '265.0567515,HMDB0030584,Silidianin,n/a,C25H24O10,484.136946988,M+2Na,+,265.057691,4', + ], + ['265.0567515'], + 5 + ), + [ + [ + { + 'ENTRY_DELTA' => '2', + 'ENTRY_FORMULA' => 'C5H8O2S', + 'ENTRY_ENTRY_ID' => 'HMDB0059667', + 'ENTRY_ADDUCT_MZ' => '265.056276', + 'ENTRY_ADDUCT_TYPE' => '+', + 'ENTRY_CPD_MZ' => '132.02450019', + 'ENTRY_ADDUCT' => '2M+H' + }, + { + 'ENTRY_ADDUCT_MZ' => '265.056128', + 'ENTRY_ENTRY_ID' => 'HMDB0038767', + 'ENTRY_ADDUCT_TYPE' => '+', + 'ENTRY_CPD_MZ' => '726.200729034', + 'ENTRY_ADDUCT' => 'M+3Na', + 'ENTRY_DELTA' => '2', + 'ENTRY_FORMULA' => 'C32H38O19' + }, + { + 'ENTRY_DELTA' => '2', + 'ENTRY_FORMULA' => 'C32H38O19', + 'ENTRY_ENTRY_ID' => 'HMDB0039759', + 'ENTRY_ADDUCT_MZ' => '265.056128', + 'ENTRY_ADDUCT_TYPE' => '+', + 'ENTRY_CPD_MZ' => '726.200729034', + 'ENTRY_ADDUCT' => 'M+3Na' + }, + { + 'ENTRY_FORMULA' => 'C32H38O19', + 'ENTRY_DELTA' => '2', + 'ENTRY_ADDUCT_TYPE' => '+', + 'ENTRY_ADDUCT_MZ' => '265.056128', + 'ENTRY_ENTRY_ID' => 'HMDB0040875', + 'ENTRY_CPD_MZ' => '726.200729034', + 'ENTRY_ADDUCT' => 'M+3Na' + }, + { + 'ENTRY_ADDUCT_TYPE' => '+', + 'ENTRY_ENTRY_ID' => 'HMDB0040878', + 'ENTRY_ADDUCT_MZ' => '265.056128', + 'ENTRY_ADDUCT' => 'M+3Na', + 'ENTRY_CPD_MZ' => '726.200729034', + 'ENTRY_FORMULA' => 'C32H38O19', + 'ENTRY_DELTA' => '2' + } + ] + ], + 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ; + + }