annotate t/downloader_bank_hmdb.t @ 0:7c9269bded0e draft

Init repository for [downloader_bank_hmdb]
author fgiacomoni
date Tue, 14 Jan 2020 05:21:23 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
1 #! perl
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
2 use diagnostics;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
3 use warnings;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
4 no warnings qw/void/;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
5 use strict;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
6 no strict "refs" ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
7 use Test::More qw( no_plan );
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
8 #use Test::More tests => 8 ; ## with MAPPER SEQUENCE
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
9 use FindBin ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
10 use Carp ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
11
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
12 ## Specific Modules
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
13 use lib $FindBin::Bin.'/lib' ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
14 my $binPath = $FindBin::Bin ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
15 use utilsTest qw( :ALL ) ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
16 use hmdb_apiTest qw( :ALL ) ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
17
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
18
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
19 ## If needed to launch parallele test sequences : SEQ01, SEQ02, SEQ03, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
20 my $sequence = 'SEQ02' ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
21 my $current_test = 1 ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
22
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
23 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
24
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
25 ## START of SEQ01 SEQUENCE ##
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
26
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
27 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
28
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
29 if ($sequence eq "SEQ01") {
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
30
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
31 print "\n\t\t\t\t * * * * * * \n" ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
32 print "\t * * * - - - Test module utils - - - * * * \n\n" ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
33
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
34 ## - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
35 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
36 sleep 1 ; print "\n** Test $current_test getHttpFileVersion with a valid url **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
37 is_deeply( getHttpFileVersionTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
38 'http://www.hmdb.ca/system/downloads/current/urine_metabolites.zip',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
39 ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
40 'v2018Jul09',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
41 'Method \'getHttpFileVersion\' works with a valid url and return the attended output');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
42
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
43
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
44 ## - - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
45 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
46 sleep 1 ; print "\n** Test $current_test getHttpFile with a valid url and fileName **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
47 is_deeply( getHttpFileTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
48 'http://www.hmdb.ca/system/downloads/current/csf_metabolites.zip',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
49 '/tmp/CSF_v2018Jul09/CSF_v2018Jul09.zip'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
50 ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
51 1,
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
52 'Method \'getHttpFile\' works with a valid url and a file name and return the attended output (a file)');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
53
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
54
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
55 ## - - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
56 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
57 sleep 1 ; print "\n** Test $current_test unzipFile with a valid url, a dir and fileName **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
58 is_deeply( unzipFileTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
59 '/tmp/CSF_v2018Jul09/CSF_v2018Jul09.zip',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
60 '/tmp/CSF_v2018Jul09/csf_metabolites.xml',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
61 'csf_metabolites.xml'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
62
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
63 ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
64 1,
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
65 'Method \'unzipFile\' works with a valid url and a file name and return the attended output (1)');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
66
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
67 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
68
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
69 ## END of SEQ01 SEQUENCE ##
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
70
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
71 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
72
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
73 }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
74
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
75 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
76
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
77 ## START of SEQ02 SEQUENCE ##
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
78
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
79 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
80 elsif ($sequence eq "SEQ02") {
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
81 print "\n\t\t\t\t * * * * * * \n" ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
82 print "\t * * * - - - Test SEQ02 Main script - - - * * * \n\n" ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
83
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
84 ## - - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
85 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
86 # sleep 1 ; print "\n** Test $current_test getMetaboliteFeatures with a valid xml file **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
87 # is_deeply( getMetaboliteFeaturesTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
88 # '/Users/fgiacomoni/Inra/labs/perl/downloader-bank-hmdb/banks/CSF_v2018Jul09/csf_metabolites.xml',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
89 # ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
90 # 450,
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
91 # 'Method \'getMetaboliteFeatures\' works with a valid xml and return the attended output (HASH)');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
92
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
93 ## - - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
94 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
95 sleep 1 ; print "\n** Test $current_test buildMetabolitesArray with a hash of metabolites **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
96 is_deeply( buildMetabolitesArrayTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
97 { 'HMDB0001565' => { 'metabolite_name' => 'Phosphorylcholine',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
98 'monisotopic_molecular_weight' => '184.073869485',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
99 '[M+H]+' => '185.081145885',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
100 '[M-H]-' => '183.066593085',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
101 'chemical_formula' => 'C5H15NO4P',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
102 'inchikey' => 'YHHSONZFOIEMCP-UHFFFAOYSA-O' },
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
103 'HMDB0006088' => { 'monisotopic_molecular_weight' => '180.063388116',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
104 '[M+H]+' => '181.070664516',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
105 '[M-H]-' => '179.056111716',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
106 'inchikey' => 'CDAISMWEOUEBRE-CDRYSYESSA-N',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
107 'chemical_formula' => 'C6H12O6',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
108 'metabolite_name' => 'scyllo-Inositol' }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
109 },
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
110 ['HMDB_ID','MzBank', '[M+H]+', '[M-H]-','MetName', 'ChemFormula', 'INChIkey']
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
111 ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
112 [
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
113 [
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
114 'HMDB_ID',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
115 'MzBank',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
116 '[M+H]+',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
117 '[M-H]-',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
118 'MetName',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
119 'ChemFormula',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
120 'INChIkey'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
121 ],
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
122 [
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
123 'HMDB0001565',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
124 '184.073869485',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
125 '185.081145885',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
126 '183.066593085',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
127 'Phosphorylcholine',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
128 'C5H15NO4P',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
129 'YHHSONZFOIEMCP-UHFFFAOYSA-O'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
130 ],
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
131 [
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
132 'HMDB0006088',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
133 '180.063388116',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
134 '181.070664516',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
135 '179.056111716',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
136 'scyllo-Inositol',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
137 'C6H12O6',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
138 'CDAISMWEOUEBRE-CDRYSYESSA-N'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
139 ]
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
140 ],
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
141 'Method \'buildMetabolitesArray\' works with a valid metabolites list and return the attended output (Array)');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
142
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
143 ## - - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
144 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
145 sleep 1 ; print "\n** Test $current_test setMetaboliteAcurrateMzToModesMz with a hash of metabolites **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
146 is_deeply( setMetaboliteAcurrateMzToModesMzTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
147 'CARD',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
148 [
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
149 {
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
150 'COMMON_NAME' => 'SM(d18:0/24:1(15Z)(OH))',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
151 'LOCATION' => 'Rumen',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
152 'MZ_AVERAGE' => '829.224',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
153 'INCHI' => 'InChI=1/C47H93N2O7P/c1-6-8-10-12-14-16-18-20-21-22-23-24-25-27-28-30-32-34-36-38-44(50)42-47(52)48-45(43-56-57(53,54)55-41-40-49(3,4)5)46(51)39-37-35-33-31-29-26-19-17-15-13-11-9-7-2/h20-21,37,39,44-46,50-51H,6-19,22-36,38,40-43H2,1-5H3,(H-,48,52,53,54)/b21-20-,39-37+/t44?,45-,46+/m0/s1',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
154 'FORMULA' => 'C47H93N2O7P',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
155 'TAXONOMY' => 'Lipids',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
156 'HMDB_ID' => 'HMDB13469',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
157 'KEGG_ID' => 'C00550',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
158 'BIOCYC_ID' => 'Not Available',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
159 'IUPAC' => 'Not Available',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
160 'CAS' => 'Not Available',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
161 'MZ_MONO' => '828.672058'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
162 }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
163 ]
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
164 ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
165 [
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
166 {
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
167 'MZ_[M-H]-' => '827.6647816',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
168 'COMMON_NAME' => 'SM(d18:0/24:1(15Z)(OH))',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
169 'LOCATION' => 'Rumen',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
170 'MZ_[M+H]+' => '829.6793344',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
171 'MZ_AVERAGE' => '829.224',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
172 'INCHI' => 'InChI=1/C47H93N2O7P/c1-6-8-10-12-14-16-18-20-21-22-23-24-25-27-28-30-32-34-36-38-44(50)42-47(52)48-45(43-56-57(53,54)55-41-40-49(3,4)5)46(51)39-37-35-33-31-29-26-19-17-15-13-11-9-7-2/h20-21,37,39,44-46,50-51H,6-19,22-36,38,40-43H2,1-5H3,(H-,48,52,53,54)/b21-20-,39-37+/t44?,45-,46+/m0/s1',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
173 'FORMULA' => 'C47H93N2O7P',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
174 'TAXONOMY' => 'Lipids',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
175 'HMDB_ID' => 'HMDB13469',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
176 'KEGG_ID' => 'C00550',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
177 'BIOCYC_ID' => 'Not Available',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
178 'IUPAC' => 'Not Available',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
179 'CAS' => 'Not Available',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
180 'MZ_MONO' => '828.672058'
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
181 }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
182 ],
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
183 'Method \'setMetaboliteAcurrateMzToModesMz\' works with XML FORMAT AND a valid metabolites list and return the attended output (Array)');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
184
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
185 ## - - - - - - - - - - - - - - - - - - - NEXT - - - - - - - - - - - - - - - - - - -
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
186 # ARGVTS : $argt1, ...
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
187 sleep 1 ; print "\n** Test $current_test setMetaboliteAcurrateMzToModesMz with a hash of metabolites **\n" ; $current_test++ ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
188 is_deeply( setMetaboliteAcurrateMzToModesMzTest ( ## input parameters : here only one argt
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
189 'XML',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
190 { 'HMDB0001565' => { 'metabolite_name' => 'Phosphorylcholine',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
191 'monisotopic_molecular_weight' => '184.073869485',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
192 'chemical_formula' => 'C5H15NO4P',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
193 'inchikey' => 'YHHSONZFOIEMCP-UHFFFAOYSA-O' },
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
194 'HMDB0006088' => { 'monisotopic_molecular_weight' => '180.063388116',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
195 'inchikey' => 'CDAISMWEOUEBRE-CDRYSYESSA-N',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
196 'chemical_formula' => 'C6H12O6',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
197 'metabolite_name' => 'scyllo-Inositol' }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
198 }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
199 ),
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
200 { 'HMDB0001565' => { 'metabolite_name' => 'Phosphorylcholine',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
201 'monisotopic_molecular_weight' => '184.073869485',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
202 '[M+H]+' => '185.081145885',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
203 '[M-H]-' => '183.066593085',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
204 'chemical_formula' => 'C5H15NO4P',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
205 'inchikey' => 'YHHSONZFOIEMCP-UHFFFAOYSA-O' },
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
206 'HMDB0006088' => { 'monisotopic_molecular_weight' => '180.063388116',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
207 '[M+H]+' => '181.070664516',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
208 '[M-H]-' => '179.056111716',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
209 'inchikey' => 'CDAISMWEOUEBRE-CDRYSYESSA-N',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
210 'chemical_formula' => 'C6H12O6',
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
211 'metabolite_name' => 'scyllo-Inositol' }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
212 },
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
213 'Method \'setMetaboliteAcurrateMzToModesMz\' works with XML FORMAT AND a valid metabolites list and return the attended output (Array)');
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
214
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
215 } ## END ELSIF SEQ02
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
216
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
217 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
218
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
219 ## END of SEQ02 SEQUENCE ##
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
220
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
221 #### #### ##### ###### ################################################ ###### ##### ##### ###### ######
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
222
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
223
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
224 else {
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
225 croak "Can\'t launch any test : no sequence clearly defined !!!!\n" ;
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
226 }
7c9269bded0e Init repository for [downloader_bank_hmdb]
fgiacomoni
parents:
diff changeset
227