Mercurial > repos > fgiacomoni > hmdb_ms_search
comparison t/hmdb_managerTest.pl @ 23:2d8a310e86ce draft
Prod branch Updating with v.:CI_COMMIT_TAG- - Fxx
author | fgiacomoni |
---|---|
date | Thu, 19 May 2022 13:43:09 +0000 |
parents | 4eb2de7c24d1 |
children |
comparison
equal
deleted
inserted
replaced
22:453fbe98925a | 23:2d8a310e86ce |
---|---|
41 print "\n** Test $current_test prepare_multi_masses_query with a list of mzs **\n" ; $current_test++; | 41 print "\n** Test $current_test prepare_multi_masses_query with a list of mzs **\n" ; $current_test++; |
42 is_deeply( prepare_multi_masses_queryTest( | 42 is_deeply( prepare_multi_masses_queryTest( |
43 ['175.01', '238.19', '420.16', '780.32', '956.25', '1100.45' ] ), | 43 ['175.01', '238.19', '420.16', '780.32', '956.25', '1100.45' ] ), |
44 '175.01%0D%0A238.19%0D%0A420.16%0D%0A780.32%0D%0A956.25%0D%0A1100.45%0D%0A', | 44 '175.01%0D%0A238.19%0D%0A420.16%0D%0A780.32%0D%0A956.25%0D%0A1100.45%0D%0A', |
45 'Method \'prepare_multi_masses_query\' works with a list of and return a well formated string for hmdb querying'); | 45 'Method \'prepare_multi_masses_query\' works with a list of and return a well formated string for hmdb querying'); |
46 | 46 |
47 print "\n** Test $current_test get_matches_from_hmdb_ua with a well-formated string of mzs **\n" ; $current_test++; | 47 print "\n** Test $current_test get_matches_from_hmdb_ua with a well-formated string of mzs **\n" ; $current_test++; |
48 is_deeply( get_matches_from_hmdb_uaTest( | 48 is_deeply( getMatchesFromHmdb5WithUATest( |
49 '175.01%0D%0A420.16%0D%0A780.32%0D%0A956.25%0D%0A1100.45%0D%0A', 0.001, 'positive'), | 49 '175.01%0D%0A420.16%0D%0A780.32%0D%0A956.25%0D%0A1100.45%0D%0A', 0.001, 'positive'), |
50 [ | 50 [ |
51 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)', | 51 'query_mass,compound_id,compound_name,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,"delta(ppm),",ccs_value', |
52 # '175.01,HMDB60293,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,0.000125', | 52 '175.01,HMDB0259477,"S-(N,N-Diethyldithiocarbamoyl)-N-acetyl-L-cysteine",C10H18N2O3S3,310.04795597,M+H+K,+,175.009195,5,', |
53 # '175.01,HMDB03745,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,0.000676', | 53 '175.01,HMDB0258038,9-(Formyloxymethyl)-9H-fluorene-2-sulfonic acid,C15H12O5S,304.04054466,M+2Na,+,175.00949,3,', |
54 # '175.01,HMDB31436,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,0.000895', | 54 '175.01,HMDB0257737,"4,5-Dihydroxy-3-methyl-1H-imidazol-2-one",C4H6N2O3,130.037842061,M+2Na-H,+,175.009002,6,', |
55 # '175.01,HMDB33657,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', | 55 '175.01,HMDB0240502,Dihydroresveratrol 4\'-sulfate,C14H14O6S,310.051109345,M+H+K,+,175.010772,4,', |
56 # '175.01,HMDB35230,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', | 56 '175.01,HMDB0240500,Dihydroresveratrol 3-sulfate,C14H14O6S,310.051109345,M+H+K,+,175.010772,4,', |
57 # '420.16,HMDB60838,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683', | 57 '175.01,HMDB0246744,"5-Amino-1,3,4-thiadiazole-2-thiol",C2H3N3S2,132.976839457,M+ACN+H,+,175.010662,4,', |
58 # '420.16,HMDB60836,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683' | 58 '175.01,HMDB0252977,Phosphoaminophosphonic acid-guanylate ester,C10H17N6O13P3,522.006645625,M+3H,+,175.009491,3,', |
59 ## Update format - 2018-01-19... HMDB V04 | 59 '175.01,HMDB0246800,5-Hydroxy-1-methylhydantoin,C4H6N2O3,130.037842061,M+2Na-H,+,175.009002,6,', |
60 # '175.01,HMDB0060293,Hydroxidodioxidosulfidosulfate,C05529,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,1', | 60 '175.01,HMDB0258677,Tafamidis,C14H7Cl2NO3,306.980298509,M+ACN+2H,+,175.010699,4,', |
61 # '175.01,HMDB0003745,Mesna,C03576,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,4', | 61 '175.01,HMDB0240280,Mesylate,CH4O3S,95.988114684,M+DMSO+H,+,175.009335,4,', |
62 # '175.01,HMDB0031436,Silicic acid,n/a,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,5', | 62 '175.01,HMDB0000257,Thiosulfate,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,1,', |
63 # '175.01,HMDB0033657,De-o-methylsterigmatocystin,C03683,C17H10O6,310.047738052,M+H+K,+,175.009086,5', | 63 '175.01,HMDB0035230,Aurantricholide B,C17H10O6,310.047738052,M+H+K,+,175.009086,5,', |
64 # '175.01,HMDB0035230,"6,7-Dihydroxy-3-(4-hydroxyphenyl)furo[3,2-b]chromen-2-one",n/a,C17H10O6,310.047738052,M+H+K,+,175.009086,5', | 64 '175.01,HMDB0033657,De-O-methylsterigmatocystin,C17H10O6,310.047738052,M+H+K,+,175.009086,5,', |
65 # '420.16,HMDB0060838,"4-hydroxy-5-[(4-{2-[(5-hydroxy-1,2-dihydropyridin-2-ylidene)amino]ethoxy}phenyl)methyl]-2,5-dihydro-1,3-thiazol-2-one",n/a,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2', | 65 '175.01,HMDB0003745,Mesna,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,4,', |
66 # '420.16,HMDB0060836,N-Desmethyl O-hydroxyrosiglitazone,n/a,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2', | 66 '420.16,HMDB0250452,Core oligosaccharide,C27H48O24,756.253552426,M+2ACN+2H,+,420.160599,1,', |
67 ## Update results - 2018-09-20... HMDBv4 | 67 '420.16,HMDB0245742,"N-(6,8-Difluoro-2-methyl-4-quinolinyl)-N\'-[4-(dimethylamino)phenyl]urea",C19H18F2N4O,356.144867542,M+ACN+Na,+,420.160633,2,', |
68 #'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)', | 68 '420.16,HMDB0256144,Pazopanib,C21H23N7O2S,437.163393705,M+H-H2O,+,420.160694,2,', |
69 '175.01,HMDB0149376,"2-{[5,6-dihydroxy-3-(4-hydroxyphenyl)-4-oxo-3,4-dihydro-2H-1-benzopyran-7-yl]oxy}-3-(sulfooxy)butanedioic acid",n/a,C19H16O14S,500.026076369,M+2H+Na,+,175.009949,0', | 69 '420.16,HMDB0060838,N-Desmethyl-p-hydroxyrosiglitazone,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2,', |
70 '175.01,HMDB0149375,"2-({5,6-dihydroxy-4-oxo-3-[4-(sulfooxy)phenyl]-3,4-dihydro-2H-1-benzopyran-7-yl}oxy)-3-hydroxybutanedioic acid",n/a,C19H16O14S,500.026076369,M+2H+Na,+,175.009949,0', | 70 '420.16,HMDB0060836,N-Desmethyl-O-hydroxy rosiglitazone,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2,' |
71 '175.01,HMDB0149419,"2-{[5,8-dihydroxy-3-(4-hydroxyphenyl)-4-oxo-3,4-dihydro-2H-1-benzopyran-7-yl]oxy}-3-(sulfooxy)butanedioic acid",n/a,C19H16O14S,500.026076369,M+2H+Na,+,175.009949,0', | |
72 '175.01,HMDB0149418,"2-({5,8-dihydroxy-4-oxo-3-[4-(sulfooxy)phenyl]-3,4-dihydro-2H-1-benzopyran-7-yl}oxy)-3-hydroxybutanedioic acid",n/a,C19H16O14S,500.026076369,M+2H+Na,+,175.009949,0', | |
73 '175.01,HMDB0149392,"2-{[3-(3,4-dihydroxyphenyl)-5-hydroxy-4-oxo-3,4-dihydro-2H-1-benzopyran-7-yl]oxy}-3-(sulfooxy)butanedioic acid",n/a,C19H16O14S,500.026076369,M+2H+Na,+,175.009949,0', | |
74 '175.01,HMDB0149391,"2-hydroxy-3-({5-hydroxy-3-[4-hydroxy-3-(sulfooxy)phenyl]-4-oxo-3,4-dihydro-2H-1-benzopyran-7-yl}oxy)butanedioic acid",n/a,C19H16O14S,500.026076369,M+2H+Na,+,175.009949,0', | |
75 '175.01,HMDB0000257,Thiosulfate,C05529,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,1', | |
76 '175.01,HMDB0060293,Thiosulfate,C05529,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,1', | |
77 '175.01,HMDB0141391,{4-[(1E)-3-oxo-3-phenylprop-1-en-1-yl]phenyl}oxidanesulfonic acid,n/a,C15H12O5S,304.04054466,M+2Na,+,175.00949,3', | |
78 '175.01,HMDB0141389,{3-[(1E)-3-oxo-3-phenylprop-1-en-1-yl]phenyl}oxidanesulfonic acid,n/a,C15H12O5S,304.04054466,M+2Na,+,175.00949,3', | |
79 '175.01,HMDB0135622,{4-[(2E)-3-phenylprop-2-enoyl]phenyl}oxidanesulfonic acid,n/a,C15H12O5S,304.04054466,M+2Na,+,175.00949,3', | |
80 '175.01,HMDB0135448,{3-[(2E)-3-phenylprop-2-enoyl]phenyl}oxidanesulfonic acid,n/a,C15H12O5S,304.04054466,M+2Na,+,175.00949,3', | |
81 '175.01,HMDB0240280,Methanesulfonic acid,C11145,CH4O3S,95.988114684,M+DMSO+H,+,175.009335,4', | |
82 '175.01,HMDB0003745,Coenzyme m,C03576,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,4', | |
83 '175.01,HMDB0142159,[2-hydroxy-2-(2-hydroxyphenyl)-1-phenylethoxy]sulfonic acid,n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
84 '175.01,HMDB0142160,[2-hydroxy-1-(2-hydroxyphenyl)-2-phenylethoxy]sulfonic acid,n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
85 '175.01,HMDB0142162,"[3-(1,2-dihydroxy-2-phenylethyl)phenyl]oxidanesulfonic acid",n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
86 '175.01,HMDB0142166,"[4-(1,2-dihydroxy-2-phenylethyl)phenyl]oxidanesulfonic acid",n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
87 '175.01,HMDB0142164,[2-hydroxy-1-(3-hydroxyphenyl)-2-phenylethoxy]sulfonic acid,n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
88 '175.01,HMDB0142163,[2-hydroxy-2-(3-hydroxyphenyl)-1-phenylethoxy]sulfonic acid,n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
89 '175.01,HMDB0142167,[2-hydroxy-2-(4-hydroxyphenyl)-1-phenylethoxy]sulfonic acid,n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
90 '175.01,HMDB0142168,[2-hydroxy-1-(4-hydroxyphenyl)-2-phenylethoxy]sulfonic acid,n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
91 '175.01,HMDB0129951,"{3-[2-(3,5-dihydroxyphenyl)ethyl]phenyl}oxidanesulfonic acid",n/a,C14H14O6S,310.051109345,M+H+K,+,175.010772,4', | |
92 '175.01,HMDB0031436,Silicic acid,n/a,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,5', | |
93 '175.01,HMDB0033657,"11,15-Dihydroxy-6,8,20-trioxapentacyclo[10.8.0.0²,⁹.0³,⁷.0¹⁴,¹⁹]icosa-1(12),2(9),4,10,14,16,18-heptaen-13-one",C03683,C17H10O6,310.047738052,M+H+K,+,175.009086,5', | |
94 '175.01,HMDB0035230,"6,7-Dihydroxy-3-(4-hydroxyphenyl)-2H-furo[3,2-b]chromen-2-one",n/a,C17H10O6,310.047738052,M+H+K,+,175.009086,5', | |
95 '175.01,HMDB0155176,5-Hydroxy-6-hydrouracil,n/a,C4H6N2O3,130.037842061,M+2Na-H,+,175.009002,6', | |
96 '420.16,HMDB0060838,N-Desmethyl-p-hydroxyrosiglitazone,n/a,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2', | |
97 '420.16,HMDB0060836,N-Desmethyl-O-hydroxy rosiglitazone,n/a,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2', | |
98 '420.16,HMDB0160148,"6-[(5-carboxy-3-methylpentanoyl)oxy]-3,4,5-trihydroxyoxane-2-carboxylic acid",n/a,C13H20O10,336.105646844,M+IsoProp+Na+H,+,420.160757,2', | |
99 '420.16,HMDB0160149,"6-[(5-carboxy-4-methylpentanoyl)oxy]-3,4,5-trihydroxyoxane-2-carboxylic acid",n/a,C13H20O10,336.105646844,M+IsoProp+Na+H,+,420.160757,2', | |
100 '420.16,HMDB0165020,"6-{[2-(acetyloxy)-3-methylbutanoyl]oxy}-3,4,5-trihydroxyoxane-2-carboxylic acid",n/a,C13H20O10,336.105646844,M+IsoProp+Na+H,+,420.160757,2', | |
101 '420.16,HMDB0175397,"6-{[3-(acetyloxy)-3-methylbutanoyl]oxy}-3,4,5-trihydroxyoxane-2-carboxylic acid",n/a,C13H20O10,336.105646844,M+IsoProp+Na+H,+,420.160757,2', | |
102 '420.16,HMDB0184353,"6-[(4-carboxy-3,3-dimethylbutanoyl)oxy]-3,4,5-trihydroxyoxane-2-carboxylic acid",n/a,C13H20O10,336.105646844,M+IsoProp+Na+H,+,420.160757,2' | |
103 ], | 71 ], |
104 'Method \'get_matches_from_hmdb_ua\' works with a well-formated string of mzs and return a complete csv from hmdb'); | 72 'Method \'getMatchesFromHmdb5WithUA\' works again (API v5.0 compatible) with a well-formated string of mzs and return a complete csv from hmdb'); |
105 | 73 |
106 print "\n** Test $current_test test_matches_from_hmdb_ua to get hmdb status **\n" ; $current_test++; | 74 print "\n** Test $current_test test_matches_from_hmdb_ua to get hmdb status **\n" ; $current_test++; |
107 is_deeply (test_matches_from_hmdb_uaTest (), | 75 is_deeply (testMatchesFromHmdb5WithUATest (), |
108 \'200', | 76 \'200', |
109 'The HMDB server is available: returns successful HTTP requests' ) ; | 77 'The HMDB server is available: returns successful HTTP requests' ) ; |
110 | 78 |
111 print "\n** Test $current_test check_state_from_hmdb_ua to manage script execution with the hmdb server status **\n" ; $current_test++; | 79 print "\n** Test $current_test check_state_from_hmdb_ua to manage script execution with the hmdb server status **\n" ; $current_test++; |
112 is_deeply (check_state_from_hmdb_uaTest (\'200'), | 80 is_deeply (check_state_from_hmdb_uaTest (\'200'), |
113 1, | 81 1, |
114 'The status 200 returns no error/warn' ) ; | 82 'The status 200 returns no error/warn' ) ; |
115 | 83 |
116 print "\n** Test $current_test prepare_multi_masses_query with an empty list of mzs **\n" ; $current_test++; | 84 print "\n** Test $current_test check_state_from_hmdb_ua to manage script execution with the hmdb server status **\n" ; $current_test++; |
117 throws_ok{ check_state_from_hmdb_uaTest(\'504')} | 85 throws_ok{ check_state_from_hmdb_uaTest(\'504')} |
118 '/Gateway Timeout: The HMDB server was acting as a gateway or proxy and did not receive a timely response from the upstream server/', | 86 qr/Gateway Timeout \(504\): The HMDB server was acting as a gateway or proxy and did not receive a timely response from the upstream server\. The Hmdb tool is stopped with error\./, |
119 'Method \'check_state_from_hmdb_ua\' detects HTTP error code returned by HMDB and died correctly' ; | 87 'Method \'check_state_from_hmdb_ua\' detects HTTP error code returned by HMDB and died correctly' ; |
120 | 88 |
121 print "\n** Test $current_test parse_hmdb_csv_results with the correct inputs for hmdb outputs parsing (csv format) **\n" ; $current_test++; | 89 |
122 is_deeply ( parse_hmdb_csv_resultsTest ( | 90 print "\n** Test $current_test parseHmdb5CSVResults (version 5.0) with the correct inputs for hmdb outputs parsing (csv format) **\n" ; $current_test++; |
91 is_deeply ( parseHmdb5CSVResultsTest ( | |
123 [ | 92 [ |
124 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)', | 93 'query_mass,compound_id,compound_name,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,"delta(ppm),",ccs_value', |
125 # '175.01,HMDB60293,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,0.000125', | 94 '175.01,HMDB0259477,"S-(N,N-Diethyldithiocarbamoyl)-N-acetyl-L-cysteine",C10H18N2O3S3,310.04795597,M+H+K,+,175.009195,5,', |
126 # '175.01,HMDB03745,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,0.000676', | 95 '175.01,HMDB0258038,9-(Formyloxymethyl)-9H-fluorene-2-sulfonic acid,C15H12O5S,304.04054466,M+2Na,+,175.00949,3,', |
127 # '175.01,HMDB31436,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,0.000895', | 96 '175.01,HMDB0257737,"4,5-Dihydroxy-3-methyl-1H-imidazol-2-one",C4H6N2O3,130.037842061,M+2Na-H,+,175.009002,6,', |
128 # '175.01,HMDB33657,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', | 97 '175.01,HMDB0240502,Dihydroresveratrol 4\'-sulfate,C14H14O6S,310.051109345,M+H+K,+,175.010772,4,', |
129 # '175.01,HMDB35230,C17H10O6,310.047738052,M+H+K,+,175.009086,0.000914', | 98 '175.01,HMDB0240500,Dihydroresveratrol 3-sulfate,C14H14O6S,310.051109345,M+H+K,+,175.010772,4,', |
130 # '420.16,HMDB60838,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683', | 99 '175.01,HMDB0246744,"5-Amino-1,3,4-thiadiazole-2-thiol",C2H3N3S2,132.976839457,M+ACN+H,+,175.010662,4,', |
131 # '420.16,HMDB60836,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,0.000683' | 100 '175.01,HMDB0252977,Phosphoaminophosphonic acid-guanylate ester,C10H17N6O13P3,522.006645625,M+3H,+,175.009491,3,', |
132 ## Update format - 2018-01-19... HMDB V04 | 101 '175.01,HMDB0246800,5-Hydroxy-1-methylhydantoin,C4H6N2O3,130.037842061,M+2Na-H,+,175.009002,6,', |
133 '175.01,HMDB0060293,Hydroxidodioxidosulfidosulfate,C05529,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,1', | 102 '175.01,HMDB0258677,Tafamidis,C14H7Cl2NO3,306.980298509,M+ACN+2H,+,175.010699,4,', |
134 '175.01,HMDB0003745,Mesna,C03576,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,4', | 103 '175.01,HMDB0240280,Mesylate,CH4O3S,95.988114684,M+DMSO+H,+,175.009335,4,', |
135 '175.01,HMDB0031436,Silicic acid,n/a,H4O4Si,95.987885149,M+DMSO+H,+,175.009105,5', | 104 '175.01,HMDB0000257,Thiosulfate,H2O3S2,113.94453531,M+IsoProp+H,+,175.009875,1,', |
136 '175.01,HMDB0033657,De-o-methylsterigmatocystin,C03683,C17H10O6,310.047738052,M+H+K,+,175.009086,5', | 105 '175.01,HMDB0035230,Aurantricholide B,C17H10O6,310.047738052,M+H+K,+,175.009086,5,', |
137 '175.01,HMDB0035230,"6,7-Dihydroxy-3-(4-hydroxyphenyl)furo[3,2-b]chromen-2-one",n/a,C17H10O6,310.047738052,M+H+K,+,175.009086,5', | 106 '175.01,HMDB0033657,De-O-methylsterigmatocystin,C17H10O6,310.047738052,M+H+K,+,175.009086,5,', |
138 '420.16,HMDB0060838,"4-hydroxy-5-[(4-{2-[(5-hydroxy-1,2-dihydropyridin-2-ylidene)amino]ethoxy}phenyl)methyl]-2,5-dihydro-1,3-thiazol-2-one",n/a,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2', | 107 '175.01,HMDB0003745,Mesna,C2H6O3S2,141.975835438,M+CH3OH+H,+,175.009324,4,', |
139 '420.16,HMDB0060836,N-Desmethyl O-hydroxyrosiglitazone,n/a,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2', | 108 '420.16,HMDB0250452,Core oligosaccharide,C27H48O24,756.253552426,M+2ACN+2H,+,420.160599,1,', |
109 '420.16,HMDB0245742,"N-(6,8-Difluoro-2-methyl-4-quinolinyl)-N\'-[4-(dimethylamino)phenyl]urea",C19H18F2N4O,356.144867542,M+ACN+Na,+,420.160633,2,', | |
110 '420.16,HMDB0256144,Pazopanib,C21H23N7O2S,437.163393705,M+H-H2O,+,420.160694,2,', | |
111 '420.16,HMDB0060838,N-Desmethyl-p-hydroxyrosiglitazone,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2,', | |
112 '420.16,HMDB0060836,N-Desmethyl-O-hydroxy rosiglitazone,C17H17N3O4S,359.093976737,M+IsoProp+H,+,420.159317,2,' | |
140 ], | 113 ], |
141 ['175.01', '238.19', '420.16'], | 114 ['175.01', '238.19', '420.16'], |
142 10 | 115 10 |
143 ), | 116 ), |
144 [ | 117 [ |
145 [ | 118 [ |
146 { 'ENTRY_CPD_MZ' => '113.94453531', 'ENTRY_ENTRY_ID' => 'HMDB0060293', 'ENTRY_FORMULA' => 'H2O3S2', 'ENTRY_ADDUCT_MZ' => '175.009875', 'ENTRY_DELTA' => '1', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT' => 'M+IsoProp+H' }, | 119 { 'ENTRY_CPD_MZ' => '310.04795597', 'ENTRY_DELTA' => '5', 'ENTRY_FORMULA' => 'C10H18N2O3S3', 'ENTRY_ADDUCT' => 'M+H+K', 'ENTRY_ENTRY_NAME' => '"S-(N,N-Diethyldithiocarbamoyl)-N-acetyl-L-cysteine"', 'ENTRY_ENTRY_ID' => 'HMDB0259477', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.009195' }, |
147 {'ENTRY_DELTA' => '4','ENTRY_ADDUCT_TYPE' => '+','ENTRY_ADDUCT' => 'M+CH3OH+H','ENTRY_CPD_MZ' => '141.975835438','ENTRY_ENTRY_ID' => 'HMDB0003745','ENTRY_FORMULA' => 'C2H6O3S2','ENTRY_ADDUCT_MZ' => '175.009324'}, | 120 { 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.00949', 'ENTRY_ENTRY_ID' => 'HMDB0258038', 'ENTRY_ENTRY_NAME' => '9-(Formyloxymethyl)-9H-fluorene-2-sulfonic acid', 'ENTRY_FORMULA' => 'C15H12O5S', 'ENTRY_ADDUCT' => 'M+2Na', 'ENTRY_DELTA' => '3', 'ENTRY_CPD_MZ' => '304.04054466' }, |
148 {'ENTRY_ENTRY_ID' => 'HMDB0031436','ENTRY_CPD_MZ' => '95.987885149','ENTRY_ADDUCT_MZ' => '175.009105','ENTRY_FORMULA' => 'H4O4Si','ENTRY_DELTA' => '5','ENTRY_ADDUCT_TYPE' => '+','ENTRY_ADDUCT' => 'M+DMSO+H'}, | 121 { 'ENTRY_FORMULA' => 'C14H14O6S', 'ENTRY_ADDUCT' => 'M+H+K', 'ENTRY_ENTRY_NAME' => 'Dihydroresveratrol 4\'-sulfate', 'ENTRY_CPD_MZ' => '310.051109345', 'ENTRY_DELTA' => '4', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.010772', 'ENTRY_ENTRY_ID' => 'HMDB0240502' }, |
149 {'ENTRY_ADDUCT_MZ' => '175.009086','ENTRY_FORMULA' => 'C17H10O6','ENTRY_ENTRY_ID' => 'HMDB0033657','ENTRY_CPD_MZ' => '310.047738052','ENTRY_ADDUCT' => 'M+H+K','ENTRY_ADDUCT_TYPE' => '+','ENTRY_DELTA' => '5'}, | 122 { 'ENTRY_ADDUCT_MZ' => '175.010772', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ENTRY_ID' => 'HMDB0240500', 'ENTRY_ADDUCT' => 'M+H+K', 'ENTRY_FORMULA' => 'C14H14O6S', 'ENTRY_ENTRY_NAME' => 'Dihydroresveratrol 3-sulfate', 'ENTRY_CPD_MZ' => '310.051109345', 'ENTRY_DELTA' => '4' }, |
150 {'ENTRY_ADDUCT_MZ' => '175.009086','ENTRY_FORMULA' => 'C17H10O6','ENTRY_ENTRY_ID' => 'HMDB0035230','ENTRY_CPD_MZ' => '310.047738052','ENTRY_ADDUCT_TYPE' => '+','ENTRY_ADDUCT' => 'M+H+K','ENTRY_DELTA' => '5'} | 123 { 'ENTRY_ENTRY_ID' => 'HMDB0246744', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.010662', 'ENTRY_CPD_MZ' => '132.976839457', 'ENTRY_DELTA' => '4', 'ENTRY_ENTRY_NAME' => '"5-Amino-1,3,4-thiadiazole-2-thiol"', 'ENTRY_FORMULA' => 'C2H3N3S2', 'ENTRY_ADDUCT' => 'M+ACN+H' }, |
124 { 'ENTRY_ENTRY_ID' => 'HMDB0252977', 'ENTRY_ADDUCT_MZ' => '175.009491', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_CPD_MZ' => '522.006645625', 'ENTRY_DELTA' => '3', 'ENTRY_ADDUCT' => 'M+3H', 'ENTRY_FORMULA' => 'C10H17N6O13P3', 'ENTRY_ENTRY_NAME' => 'Phosphoaminophosphonic acid-guanylate ester' }, | |
125 { 'ENTRY_ENTRY_ID' => 'HMDB0258677', 'ENTRY_ADDUCT_MZ' => '175.010699', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_CPD_MZ' => '306.980298509', 'ENTRY_DELTA' => '4', 'ENTRY_ADDUCT' => 'M+ACN+2H', 'ENTRY_FORMULA' => 'C14H7Cl2NO3', 'ENTRY_ENTRY_NAME' => 'Tafamidis' }, | |
126 { 'ENTRY_ENTRY_ID' => 'HMDB0240280', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.009335', 'ENTRY_DELTA' => '4', 'ENTRY_CPD_MZ' => '95.988114684', 'ENTRY_FORMULA' => 'CH4O3S', 'ENTRY_ADDUCT' => 'M+DMSO+H', 'ENTRY_ENTRY_NAME' => 'Mesylate' }, | |
127 { 'ENTRY_DELTA' => '1', 'ENTRY_CPD_MZ' => '113.94453531', 'ENTRY_FORMULA' => 'H2O3S2', 'ENTRY_ADDUCT' => 'M+IsoProp+H', 'ENTRY_ENTRY_NAME' => 'Thiosulfate', 'ENTRY_ENTRY_ID' => 'HMDB0000257', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.009875' }, | |
128 { 'ENTRY_DELTA' => '5', 'ENTRY_CPD_MZ' => '310.047738052', 'ENTRY_ENTRY_NAME' => 'Aurantricholide B', 'ENTRY_FORMULA' => 'C17H10O6', 'ENTRY_ADDUCT' => 'M+H+K', 'ENTRY_ENTRY_ID' => 'HMDB0035230', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '175.009086' } | |
151 ], | 129 ], |
152 [], | 130 [], |
153 [ | 131 [ |
154 {'ENTRY_FORMULA' => 'C17H17N3O4S','ENTRY_ADDUCT_MZ' => '420.159317','ENTRY_CPD_MZ' => '359.093976737','ENTRY_ENTRY_ID' => 'HMDB0060838','ENTRY_ADDUCT' => 'M+IsoProp+H','ENTRY_ADDUCT_TYPE' => '+','ENTRY_DELTA' => '2'}, | 132 { 'ENTRY_ADDUCT_MZ' => '420.160599', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ENTRY_ID' => 'HMDB0250452', 'ENTRY_ADDUCT' => 'M+2ACN+2H', 'ENTRY_FORMULA' => 'C27H48O24', 'ENTRY_ENTRY_NAME' => 'Core oligosaccharide', 'ENTRY_CPD_MZ' => '756.253552426', 'ENTRY_DELTA' => '1' }, |
155 {'ENTRY_DELTA' => '2','ENTRY_ADDUCT_TYPE' => '+','ENTRY_ADDUCT' => 'M+IsoProp+H','ENTRY_ENTRY_ID' => 'HMDB0060836','ENTRY_CPD_MZ' => '359.093976737','ENTRY_ADDUCT_MZ' => '420.159317','ENTRY_FORMULA' => 'C17H17N3O4S'} | 133 { 'ENTRY_CPD_MZ' => '356.144867542', 'ENTRY_DELTA' => '2', 'ENTRY_ENTRY_NAME' => '"N-(6,8-Difluoro-2-methyl-4-quinolinyl)-N\'-[4-(dimethylamino)phenyl]urea"', 'ENTRY_FORMULA' => 'C19H18F2N4O', 'ENTRY_ADDUCT' => 'M+ACN+Na', 'ENTRY_ENTRY_ID' => 'HMDB0245742', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ADDUCT_MZ' => '420.160633' }, |
134 { 'ENTRY_ADDUCT_MZ' => '420.159317', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ENTRY_ID' => 'HMDB0060838', 'ENTRY_ADDUCT' => 'M+IsoProp+H', 'ENTRY_FORMULA' => 'C17H17N3O4S', 'ENTRY_ENTRY_NAME' => 'N-Desmethyl-p-hydroxyrosiglitazone', 'ENTRY_CPD_MZ' => '359.093976737', 'ENTRY_DELTA' => '2' }, | |
135 { 'ENTRY_ADDUCT_MZ' => '420.159317', 'ENTRY_ADDUCT_TYPE' => '+', 'ENTRY_ENTRY_ID' => 'HMDB0060836', 'ENTRY_ADDUCT' => 'M+IsoProp+H', 'ENTRY_FORMULA' => 'C17H17N3O4S', 'ENTRY_ENTRY_NAME' => 'N-Desmethyl-O-hydroxy rosiglitazone', 'ENTRY_DELTA' => '2', 'ENTRY_CPD_MZ' => '359.093976737' } | |
156 ] | 136 ] |
157 ], | 137 ], |
158 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ; | 138 'Method \'parseHmdb5CSVResults\' works with a well-formated csv output and returns a a well formated array' ) ; |
159 | 139 |
160 print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a list of mzs **\n" ; $current_test++; | 140 |
161 is_deeply ( parse_hmdb_csv_resultsTest ( [], ['175.01', '238.19', '420.16'] ), | 141 # print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a list of mzs **\n" ; $current_test++; |
162 [ [], [], [] ], | 142 # is_deeply ( parse_hmdb_csv_resultsTest ( [], ['175.01', '238.19', '420.16'] ), |
163 'Method \'parse_hmdb_csv_results\' works with a empty csv output and returns an empty but well formatted array' ) ; | 143 # [ [], [], [] ], |
164 | 144 # 'Method \'parse_hmdb_csv_results\' works with a empty csv output and returns an empty but well formatted array' ) ; |
165 print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a void mz list **\n" ; $current_test++; | 145 # |
166 is_deeply ( parse_hmdb_csv_resultsTest ( [], [] ), | 146 # print "\n** Test $current_test parse_hmdb_csv_results with a void hmdb output and a void mz list **\n" ; $current_test++; |
167 [], | 147 # is_deeply ( parse_hmdb_csv_resultsTest ( [], [] ), |
168 'Method \'parse_hmdb_csv_results\' works with a empty csv output/mz list and returns an empty but well formatted array' ) ; | 148 # [], |
169 | 149 # 'Method \'parse_hmdb_csv_results\' works with a empty csv output/mz list and returns an empty but well formatted array' ) ; |
170 ## Other example... from mz 265.0567515 | 150 # |
171 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++; | 151 # ## Other example... from mz 265.0567515 |
172 is_deeply ( parse_hmdb_csv_resultsTest ( | 152 # 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++; |
173 [ | 153 # is_deeply ( parse_hmdb_csv_resultsTest ( |
174 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)', | 154 # [ |
175 '265.0567515,HMDB0059667,3-Methylsulfolene,n/a,C5H8O2S,132.02450019,2M+H,+,265.056276,2', | 155 # 'query_mass,compound_id,compound_name,kegg_id,formula,monoisotopic_mass,adduct,adduct_type,adduct_m/z,delta(ppm)', |
176 '265.0567515,HMDB0038767,Camelliaside b,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', | 156 # '265.0567515,HMDB0059667,3-Methylsulfolene,n/a,C5H8O2S,132.02450019,2M+H,+,265.056276,2', |
177 '265.0567515,HMDB0039759,Kaempferol 3-(2g-apiosylrobinobioside),n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', | 157 # '265.0567515,HMDB0038767,Camelliaside b,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', |
178 '265.0567515,HMDB0040875,Isoschaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', | 158 # '265.0567515,HMDB0039759,Kaempferol 3-(2g-apiosylrobinobioside),n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', |
179 '265.0567515,HMDB0040878,Schaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', | 159 # '265.0567515,HMDB0040875,Isoschaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', |
180 '265.0567515,HMDB0059600,erythro-5-Phosphonooxy-L-lysine,C03366,C6H15N2O6P,242.066772734,M+Na,+,265.055991,3', | 160 # '265.0567515,HMDB0040878,Schaftoside 4\'-glucoside,n/a,C32H38O19,726.200729034,M+3Na,+,265.056128,2', |
181 '265.0567515,HMDB0061174,"2,4-Imidazolidinedione, 3-ethyl-5-(4-hydroxyphenyl)-",n/a,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', | 161 # '265.0567515,HMDB0059600,erythro-5-Phosphonooxy-L-lysine,C03366,C6H15N2O6P,242.066772734,M+Na,+,265.055991,3', |
182 '265.0567515,HMDB0015571,Oxitriptan,C00643,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', | 162 # '265.0567515,HMDB0061174,"2,4-Imidazolidinedione, 3-ethyl-5-(4-hydroxyphenyl)-",n/a,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', |
183 '265.0567515,HMDB0000472,5-hydroxy-l-tryptophan,C01017,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', | 163 # '265.0567515,HMDB0015571,Oxitriptan,C00643,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', |
184 '265.0567515,HMDB0030584,Silidianin,n/a,C25H24O10,484.136946988,M+2Na,+,265.057691,4', | 164 # '265.0567515,HMDB0000472,5-hydroxy-l-tryptophan,C01017,C11H12N2O3,220.08479226,M+2Na-H,+,265.055952,3', |
185 ], | 165 # '265.0567515,HMDB0030584,Silidianin,n/a,C25H24O10,484.136946988,M+2Na,+,265.057691,4', |
186 ['265.0567515'], | 166 # ], |
187 5 | 167 # ['265.0567515'], |
188 ), | 168 # 5 |
189 [ | 169 # ), |
190 [ | 170 # [ |
191 { | 171 # [ |
192 'ENTRY_DELTA' => '2', | 172 # { |
193 'ENTRY_FORMULA' => 'C5H8O2S', | 173 # 'ENTRY_DELTA' => '2', |
194 'ENTRY_ENTRY_ID' => 'HMDB0059667', | 174 # 'ENTRY_FORMULA' => 'C5H8O2S', |
195 'ENTRY_ADDUCT_MZ' => '265.056276', | 175 # 'ENTRY_ENTRY_ID' => 'HMDB0059667', |
196 'ENTRY_ADDUCT_TYPE' => '+', | 176 # 'ENTRY_ADDUCT_MZ' => '265.056276', |
197 'ENTRY_CPD_MZ' => '132.02450019', | 177 # 'ENTRY_ADDUCT_TYPE' => '+', |
198 'ENTRY_ADDUCT' => '2M+H' | 178 # 'ENTRY_CPD_MZ' => '132.02450019', |
199 }, | 179 # 'ENTRY_ADDUCT' => '2M+H' |
200 { | 180 # }, |
201 'ENTRY_ADDUCT_MZ' => '265.056128', | 181 # { |
202 'ENTRY_ENTRY_ID' => 'HMDB0038767', | 182 # 'ENTRY_ADDUCT_MZ' => '265.056128', |
203 'ENTRY_ADDUCT_TYPE' => '+', | 183 # 'ENTRY_ENTRY_ID' => 'HMDB0038767', |
204 'ENTRY_CPD_MZ' => '726.200729034', | 184 # 'ENTRY_ADDUCT_TYPE' => '+', |
205 'ENTRY_ADDUCT' => 'M+3Na', | 185 # 'ENTRY_CPD_MZ' => '726.200729034', |
206 'ENTRY_DELTA' => '2', | 186 # 'ENTRY_ADDUCT' => 'M+3Na', |
207 'ENTRY_FORMULA' => 'C32H38O19' | 187 # 'ENTRY_DELTA' => '2', |
208 }, | 188 # 'ENTRY_FORMULA' => 'C32H38O19' |
209 { | 189 # }, |
210 'ENTRY_DELTA' => '2', | 190 # { |
211 'ENTRY_FORMULA' => 'C32H38O19', | 191 # 'ENTRY_DELTA' => '2', |
212 'ENTRY_ENTRY_ID' => 'HMDB0039759', | 192 # 'ENTRY_FORMULA' => 'C32H38O19', |
213 'ENTRY_ADDUCT_MZ' => '265.056128', | 193 # 'ENTRY_ENTRY_ID' => 'HMDB0039759', |
214 'ENTRY_ADDUCT_TYPE' => '+', | 194 # 'ENTRY_ADDUCT_MZ' => '265.056128', |
215 'ENTRY_CPD_MZ' => '726.200729034', | 195 # 'ENTRY_ADDUCT_TYPE' => '+', |
216 'ENTRY_ADDUCT' => 'M+3Na' | 196 # 'ENTRY_CPD_MZ' => '726.200729034', |
217 }, | 197 # 'ENTRY_ADDUCT' => 'M+3Na' |
218 { | 198 # }, |
219 'ENTRY_FORMULA' => 'C32H38O19', | 199 # { |
220 'ENTRY_DELTA' => '2', | 200 # 'ENTRY_FORMULA' => 'C32H38O19', |
221 'ENTRY_ADDUCT_TYPE' => '+', | 201 # 'ENTRY_DELTA' => '2', |
222 'ENTRY_ADDUCT_MZ' => '265.056128', | 202 # 'ENTRY_ADDUCT_TYPE' => '+', |
223 'ENTRY_ENTRY_ID' => 'HMDB0040875', | 203 # 'ENTRY_ADDUCT_MZ' => '265.056128', |
224 'ENTRY_CPD_MZ' => '726.200729034', | 204 # 'ENTRY_ENTRY_ID' => 'HMDB0040875', |
225 'ENTRY_ADDUCT' => 'M+3Na' | 205 # 'ENTRY_CPD_MZ' => '726.200729034', |
226 }, | 206 # 'ENTRY_ADDUCT' => 'M+3Na' |
227 { | 207 # }, |
228 'ENTRY_ADDUCT_TYPE' => '+', | 208 # { |
229 'ENTRY_ENTRY_ID' => 'HMDB0040878', | 209 # 'ENTRY_ADDUCT_TYPE' => '+', |
230 'ENTRY_ADDUCT_MZ' => '265.056128', | 210 # 'ENTRY_ENTRY_ID' => 'HMDB0040878', |
231 'ENTRY_ADDUCT' => 'M+3Na', | 211 # 'ENTRY_ADDUCT_MZ' => '265.056128', |
232 'ENTRY_CPD_MZ' => '726.200729034', | 212 # 'ENTRY_ADDUCT' => 'M+3Na', |
233 'ENTRY_FORMULA' => 'C32H38O19', | 213 # 'ENTRY_CPD_MZ' => '726.200729034', |
234 'ENTRY_DELTA' => '2' | 214 # 'ENTRY_FORMULA' => 'C32H38O19', |
235 } | 215 # 'ENTRY_DELTA' => '2' |
236 ] | 216 # } |
237 ], | 217 # ] |
238 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ; | 218 # ], |
239 | 219 # 'Method \'parse_hmdb_csv_results\' works with a well-formated csv output and returns a a well formated array' ) ; |
240 | 220 # |
221 # | |
222 | |
241 } | 223 } |
242 | |
243 | |
244 | |
245 | |
246 | |
247 | |
248 | |
249 | |
250 | |
251 | |
252 | |
253 | |
254 | |
255 | |
256 | |
257 | |
258 | |
259 ## END of the script | 224 ## END of the script |