annotate t/bih_managerTest.t @ 1:52798007c6b2 draft default tip

Master branch Updating - - Fxx
author fgiacomoni
date Thu, 24 Jan 2019 10:02:05 -0500
parents be582bcd6585
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
1 #! perl
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
2 use diagnostics;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
3 use warnings;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
4 no warnings qw/void/;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
5 use strict;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
6 no strict "refs" ;
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
7 use Test::More tests => 37 ;
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
8 use FindBin ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
9 use Data::Dumper ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
10
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
11 ## Specific Modules
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
12 use lib $FindBin::Bin ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
13 my $binPath = $FindBin::Bin ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
14 use lib::bihTest qw( :ALL ) ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
15
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
16 ## testing check_interval
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
17 print "\n-- test whether a value is in the interval defines\n\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
18 #01
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
19 is ( check_interval_Test('test', '0', '1'), "'test' isn't a valid number!", 'Works with a value that is not a number');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
20 #02
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
21 is ( check_interval_Test('', '0', '1'), "'' isn't a valid number!", 'Works with a value that is not a number');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
22 #03
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
23 is ( check_interval_Test('-0.5', '-1', '0'), "OK", 'Works with a negative float');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
24 #04
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
25 is ( check_interval_Test('-0.5', '0', '1'), "'-0.5' is below the minimum!", 'Works with a number below the minimum!');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
26 #05
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
27 is ( check_interval_Test('2', '0', '1'), "'2' is greater than the maximum!", 'Works with a number greater than the maximum!');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
28 print "\n--\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
29
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
30 ## testing format_manual_masses
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
31 print "\n-- Test format manual list of values lib for values (ex=> masses)\n\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
32 #06
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
33 isa_ok( format_manual_list_values_Testvalues('562.0235', ' '), 'ARRAY' );
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
34 #07
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
35 is_deeply(format_manual_list_values_Testvalues('562.0235', ' '), [562.0235], 'Works with \'562.0235\' for mass');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
36 #08
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
37 is_deeply(format_manual_list_values_Testvalues('562.0235 987.4568', ' '), [562.0235, 987.4568], 'Works with \'562.0235 987.4568\' for masses');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
38 #09
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
39 is_deeply(format_manual_list_values_Testvalues('562.0235;987.4568', ';'), [562.0235, 987.4568], 'Works with \'562.0235;987.4568\' for masses');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
40 print "\n--\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
41
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
42 print "\n-- Test format manual list of values lib for ids\n\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
43 #10
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
44 isa_ok( format_manual_list_values_Testids('562.0235', ' '), 'ARRAY' );
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
45 #11
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
46 is_deeply(format_manual_list_values_Testids('562.0235', ' '), ['value_1'], 'Works with \'562.0235\' for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
47 #12
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
48 is_deeply(format_manual_list_values_Testids('562.0235 987.4568', ' '), ['value_1', 'value_2'], 'Works with \'562.0235 987.4568\' for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
49 #13
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
50 is_deeply(format_manual_list_values_Testids('562.0235 987.4568 ', ' '), ['value_1', 'value_2'], 'Works with \'562.0235 987.4568 \' for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
51 #14
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
52 is_deeply(format_manual_list_values_Testids('562.0235 987.4568 52.0235 98.48 62.0235 987.68 152.05 8.48 562.0235', ' '), ['value_1', 'value_2','value_3', 'value_4','value_5', 'value_6','value_7', 'value_8', 'value_9'], 'Works with 9 masses for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
53 #15
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
54 is_deeply(format_manual_list_values_Testids('562.0235 987.4568 52.0235 98.48 62.0235 987.68 152.05 8.48 562.0235 987.4568', ' '), ['value_01', 'value_02','value_03', 'value_04','value_05', 'value_06','value_07', 'value_08', 'value_09', 'value_10'], 'Works with 10 masses for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
55 #16
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
56 is_deeply(format_manual_list_values_Testids('562.0235 987.4568 52.0235 98.48 62.0235 987.68 152.05 8.48 562.0235 987.4568 52.0235 98.48 62.0235 987.68 152.05 8.48', ' '), ['value_01', 'value_02','value_03', 'value_04','value_05', 'value_06','value_07', 'value_08', 'value_09', 'value_10', 'value_11', 'value_12', 'value_13', 'value_14', 'value_15', 'value_16'], 'Works with 16 masses for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
57 print "\n--\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
58
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
59 ## testing manage_mode
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
60 #print "\n-- Test manage_mode lib\n\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
61 #09
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
62 #isa_ok( manage_mode_Testionization('positive,negative,neutral'), 'ARRAY' );
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
63 #10
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
64 #is_deeply(manage_mode_Testionization('positive,negative,neutral'), ['positive', 'negative', 'neutral'], 'Works with \'562.0235\' for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
65 #14
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
66 #isa_ok( format_manual_list_values_Testids('562.0235 987.4568'), 'ARRAY' );
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
67 #15
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
68 #is_deeply(format_manual_list_values_Testids('562.0235 987.4568'), ['mass_1', 'mass_2'], 'Works with \'562.0235 987.4568\' for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
69 #16
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
70 #is_deeply(format_manual_list_values_Testids('562.0235 987.4568 52.0235 98.48 62.0235 987.68 152.05 8.48 562.0235 987.4568 52.0235 98.48 62.0235 987.68 152.05 8.48'), ['mass_01', 'mass_02','mass_03', 'mass_04','mass_05', 'mass_06','mass_07', 'mass_08', 'mass_09', 'mass_10', 'mass_11', 'mass_12', 'mass_13', 'mass_14', 'mass_15', 'mass_16'], 'Works with 16 masses for ids');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
71 #print "\n--\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
72
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
73 ## testing mz_delta_conversion
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
74 print "\n-- Test mz_delta_conversion lib\n\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
75 #17
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
76 is ( mz_delta_conversion_Testmin(100, 'Da', 0.005), 99.995, 'Works with \'100, Da, 0.005\' for minimum');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
77 #18
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
78 is ( mz_delta_conversion_Testmax(100, 'Da', 0.005), 100.0051, 'Works with \'100, Da, 0.005\' for maximum');
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
79 #19
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
80 is ( mz_delta_conversion_Testmin(500, 'Da', 0.005), 499.995, 'Works with \'500, Da, 0.005\' for minimum');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
81 #20
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
82 is ( mz_delta_conversion_Testmax(500, 'Da', 0.005), 500.0051, 'Works with \'500, Da, 0.005\' for maximum');
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
83 #20.1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
84 is ( mz_delta_conversion_Testmax(500.159989, 'Da', 0.005), 500.1649891, 'Works with \'500, Da, 0.005\' for maximum');
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
85
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
86 #21
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
87 is ( mz_delta_conversion_Testmin(100, 'ppm', 5), 99.9995, 'Works with \'100, ppm, 5\' for minimum');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
88 #22
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
89 is ( mz_delta_conversion_Testmax(100, 'ppm', 5), 100.00051, 'Works with \'100, ppm, 5\' for maximum');
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
90 #23
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
91 is ( mz_delta_conversion_Testmin(500, 'ppm', 5), 499.9975, 'Works with \'500, ppm, 5\' for minimum');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
92 #24
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
93 is ( mz_delta_conversion_Testmax(500, 'ppm', 5), 500.00251, 'Works with \'500, ppm, 5\' for maximum');
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
94 print "\n--\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
95
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
96 ## testing dichotomi_search
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
97 print "\n-- Test dichotomi_search lib\n\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
98 #25
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
99 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '0'), -1, 'Works with \'0\' smaller than the 1st element');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
100 #26
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
101 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '1'), 0, 'Works with \'1\' equal to the 1st element');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
102 #27
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
103 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '5'), 4, 'Works with \'5\' equal to the 4th element');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
104 #28
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
105 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '11'), 10, 'Works with \'11\' equal to the last (10th) element');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
106 #29
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
107 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '11.001'), 11, 'Works with \'11.001\' greater than the last (10th) element');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
108 #30
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
109 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '9.5'), 9, 'Works with \'9.5\' between the 9th and the 10th element return \'9\'(the index of the 10th)');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
110 #31
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
111 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '8.5'), 8, 'Works with \'8.5\' between the 8th and the 9th element return \'8\'(the index of the 9th)');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
112 #32
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
113 is ( dichotomi_search_Test(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11'], '10.5'), 10, 'Works with \'10.5\' between the 10th and the 11th element return \'10\'(the index of the 11th)');
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
114 print "\n--\n" ;
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
115
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
116 ## test of input bank parsing
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
117 #print "\n-- Test bank parsing\n\n" ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
118 #is_deeply ( parse_bank_interest_Test(
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
119 # '/Users/fgiacomoni/Inra/labs/perl/galaxy_tools/tool-bank_inhouse/test_data/in_test2.tabular', 1),
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
120 # { '422.0849114' => [ [ 'C19H18O11', '422.0849114' ] ], '98.952389' => [ [ 'Halothane', '98.952389' ] ], '209.987659' => [ [ 'Bismuth', '209.987659' ] ], '18.0105647' => [ [ 'H2O', '18.0105647' ] ], '199.951068' => [ [ 'Picolinic acid', '199.951068' ] ], '535.3181236' => [ [ 'C18H45N7O11', '535.3181236' ] ] },
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
121 # "Parsing a bank method works an return a well organized hash\n" ) ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
122 #
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
123 #print "\n--\n" ;
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
124
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
125
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
126 ## test of rest ws of PeakForest
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
127 #print "\n-- Test PeakForest WS\n\n" ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
128 #is_deeply ( db_pforest_get_clean_range_Test(
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
129 # 'https://rest.peakforest.org', '/spectra/lcms/peaks/get-range-clean', '190.0', '200.0', 'negative'),
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
130 # [{ 'cpds' => [ 186 ], 'thMass' => '195.0877', 'sp' => 25, 'ri' => '100', 'deltaPPM' => '0.245', 'composition' => 'C8H11N4O2', 'attribution' => '[M+H]+', 'mz' => '195.0875' }, { 'composition' => 'C9H9O5', 'attribution' => '[M-H]-', 'ri' => '100', 'deltaPPM' => '0.271', 'cpds' => [ 360 ], 'thMass' => '197.0456', 'sp' => 37, 'mz' => '197.0452' }, { 'composition' => 'C9H12NO4', 'attribution' => '[M+H]+', 'deltaPPM' => '-0.426098891623529', 'ri' => '100', 'thMass' => '198.0760844', 'sp' => 77, 'cpds' => [ 1841 ], 'mz' => '198.076' }, { 'mz' => '196.0614', 'composition' => 'C9H10NO4', 'attribution' => '[M-H]-', 'cpds' => [ 1841 ], 'thMass' => '196.0615311', 'sp' => 78, 'ri' => '100', 'deltaPPM' => '-0.668667633415113' }, { 'cpds' => [ 1841 ], 'thMass' => '198.0760844', 'sp' => 79, 'ri' => '100', 'deltaPPM' => '-0.426098891623529', 'composition' => 'C9H12NO4', 'attribution' => '[M+H]+', 'mz' => '198.076' }],
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
131 # "PForest WS call works an return a clean range og mz between 190 and 200\n" ) ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
132 #
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
133 #print "\n--\n" ;
0
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
134
be582bcd6585 Master branch Updating - - Fxx
fgiacomoni
parents:
diff changeset
135 ## test of rest ws of PeakForest
1
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
136 #print "\n-- Test PeakForest JSON Bank parsing\n\n" ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
137 #
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
138 #my ($bank, $headers) = map_pfjson_bankobject_Test([ { 'cpds' => [ 186 ], 'mz' => '195.0875' }, {'mz' => '198.076', 'cpds' => [ 190 ]} ]) ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
139 #is_deeply (
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
140 # $bank,
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
141 # { '198.076' => [ [ 190, '198.076' ] ], '195.0875' => [ [ 186, '195.0875' ] ] },
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
142 # "Parsing json bank from PeakForest works an return a well organized hash for data\n" ) ;
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
143 #
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
144 #is_deeply (
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
145 # $headers,
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
146 # ['id', 'mz'],
52798007c6b2 Master branch Updating - - Fxx
fgiacomoni
parents: 0
diff changeset
147 # "Parsing json bank from PeakForest works an return a well organized array for headers\n" ) ;