# HG changeset patch # User fgiacomoni # Date 1673951492 0 # Node ID 23970530a5186fa4ad960b616e7d8ca168e5840e # Parent e2cbcf6fa22e8da78a743f2190d42a6db77ac49d master branch Updating with tag :CI_COMMIT_TAG - - Fxx diff -r e2cbcf6fa22e -r 23970530a518 HR2.xml --- a/HR2.xml Sun Dec 11 17:16:43 2022 +0000 +++ b/HR2.xml Tue Jan 17 10:31:32 2023 +0000 @@ -1,4 +1,4 @@ - + find a chemical formula from a accurate mass @@ -18,7 +18,7 @@ #if str($input_type.choice) == "YES": -input "${input_type.input}" #if str($input_type.header.header_choice) == "yes": - -nblineheader "${$input_type.header.nbHeader}" + -nbHeader "${$input_type.header.nbHeader}" #end if -colId "${input_type.colId}" -colmass "${input_type.colmass}" #else: @@ -54,14 +54,14 @@ - + - + - + @@ -192,7 +192,7 @@ ----------------- -.. image:: ./static/images/metabolomics/hr2.png +.. image:: hr2.png :width: 800 diff -r e2cbcf6fa22e -r 23970530a518 hr2_manager.pl --- a/hr2_manager.pl Sun Dec 11 17:16:43 2022 +0000 +++ b/hr2_manager.pl Tue Jan 17 10:31:32 2023 +0000 @@ -160,7 +160,7 @@ ## build exe line my $ohr_exe = lib::hr->new() ; my $hr_cmd = $ohr_exe->config_hr_exe( \$CONF->{'HR2_EXE'}, \$tolerance, $exact_mass, \$has_golden_rules, \$atomsCurrentConf ) ; - print "$hr_cmd\n" if $verbose == 3 ; + print "$$hr_cmd\n" if $verbose == 3 ; push(@{$hr_cmds}, $$hr_cmd) ; } @@ -192,7 +192,7 @@ ($tbody_object) = $oHtml->add_mz_to_tbody_object($tbody_object, $CONF->{HTML_ENTRIES_PER_PAGE}, $masses, $ids, $parsed_results ) ; ($tbody_object) = $oHtml->add_entries_to_tbody_object($tbody_object, $parsed_results) ; - print Dumper $tbody_object ; + #print Dumper $tbody_object ; my $html_file = $binPath.'/'.$CONF->{'HTML_TEMPLATE'} ; my $output = $oHtml->write_html_skel(\$output_html, $tbody_object, $nb_pages_for_html_out, $search_condition, $html_file, $CONF->{'JS_GALAXY_PATH'}, $CONF->{'CSS_GALAXY_PATH'}) ; @@ -206,11 +206,12 @@ # produce a csv based on METLIN format my $ocsv = lib::hr::new() ; if (defined $input_file) { - my $lm_matrix = undef ; - if ( ( defined $line_header ) and ( $line_header == 1 ) ) { $lm_matrix = $ocsv->set_hr_matrix_object('hr2', $masses, $parsed_results ) ; } - elsif ( ( defined $line_header ) and ( $line_header == 0 ) ) { $lm_matrix = $ocsv->set_hr_matrix_object(undef, $masses, $parsed_results ) ; } - $lm_matrix = $ocsv->add_hr_matrix_to_input_matrix($complete_rows, $lm_matrix) ; - $ocsv->write_csv_skel(\$output_csv, $lm_matrix) ; + my $hr_matrix = undef ; + if ( ( defined $line_header ) and ( $line_header == 1 ) ) { $hr_matrix = $ocsv->set_hr_matrix_object('hr2', $masses, $parsed_results ) ; } + elsif ( ( defined $line_header ) and ( $line_header == 0 ) ) { $hr_matrix = $ocsv->set_hr_matrix_object(undef, $masses, $parsed_results ) ; } + + $hr_matrix = $ocsv->add_hr_matrix_to_input_matrix($complete_rows, $hr_matrix) ; + $ocsv->write_csv_skel(\$output_csv, $hr_matrix) ; } elsif (defined $mass) { $ocsv->write_csv_one_mass($masses, $ids, $parsed_results, $output_csv) ; @@ -244,10 +245,10 @@ print Dumper $ids ; print "-- Hr_Cmds :\n" ; print Dumper $hr_cmds ; - print "-- Hr_Results :\n" ; +# print "-- Hr_Results :\n" ; # print Dumper $results ; - print "-- Hr_parsed Results :\n" ; - print Dumper $parsed_results ; +# print "-- Hr_parsed Results :\n" ; +# print Dumper $parsed_results ; my $nb_results = scalar (@{$results}) ; print "-- Hr_Results return : $nb_results\n" ; diff -r e2cbcf6fa22e -r 23970530a518 hr_out.tmpl --- a/hr_out.tmpl Sun Dec 11 17:16:43 2022 +0000 +++ b/hr_out.tmpl Tue Jan 17 10:31:32 2023 +0000 @@ -1,6 +1,1 @@ - - - - Galaxy HR2 queries - All results -
Results of HR elucidation queries -

ID from inputMass (m/z)FormulaCompound MW (Da)DeltaTotal

Valid CSS!

Copyright © INRA, N Paulhe, F Giacomoni 2014

- \ No newline at end of file +Galaxy HR2 queries - All results
Results of HR elucidation queries -

ID from inputMass (m/z)FormulaCompound MW (Da)DeltaTotal

Valid CSS!

Copyright © INRAE, N Paulhe, L Pavot, F Giacomoni 2023

\ No newline at end of file diff -r e2cbcf6fa22e -r 23970530a518 lib/hr.pm --- a/lib/hr.pm Sun Dec 11 17:16:43 2022 +0000 +++ b/lib/hr.pm Tue Jan 17 10:31:32 2023 +0000 @@ -77,7 +77,7 @@ # suppl. atoms case foreach my $atom ( (split(",", $atomsupp )) ) { - print "*** $atom***\n" ; + #print "*** $atom***\n" ; if ( exists $atomsconfig->{$atom} ) { $atomsconfig->{$atom}{'max'} = $CONF->{'DEFAULT_MAX'} ; } else { print "*** $atom not recognized***\n" ; } diff -r e2cbcf6fa22e -r 23970530a518 test-data/input04.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input04.tabular Tue Jan 17 10:31:32 2023 +0000 @@ -0,0 +1,5 @@ +Code mz formula +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na \ No newline at end of file diff -r e2cbcf6fa22e -r 23970530a518 test-data/input05.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/input05.tabular Tue Jan 17 10:31:32 2023 +0000 @@ -0,0 +1,202 @@ +Code mz formula +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na +165 144.0841 C7H13NS +1664 328.1387 C15H21NO7 +1270 276.1260 C12H21SNO4 +961 242.0996 C9H17NO5Na \ No newline at end of file diff -r e2cbcf6fa22e -r 23970530a518 test-data/out1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out1.html Tue Jan 17 10:31:32 2023 +0000 @@ -0,0 +1,1 @@ +Galaxy HR2 queries - All results
Results of HR elucidation queries - Mode used: negative / Charge: +1 / Mass tolerance: 1.0 / Composition: -H 0-200 -L 0-0 -C 0-100 -B 0-0 -S 0-10 -F 0-0 -P 0-0 -A 0-0 -O 0-70 -N 0-40 -1 0-0 -K 0-0

ID from inputMass (m/z)FormulaCompound MW (Da)DeltaTotal
mass_01175.1251
C11H16N2176.13134850.93

Valid CSS!

Copyright © INRAE, N Paulhe, L Pavot, F Giacomoni 2023

\ No newline at end of file diff -r e2cbcf6fa22e -r 23970530a518 test-data/out2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out2.html Tue Jan 17 10:31:32 2023 +0000 @@ -0,0 +1,1 @@ +Galaxy HR2 queries - All results
Results of HR elucidation queries - Mode used: neutral / Charge: +1 / Mass tolerance: 1.0 / Composition: -A 0-0 -S 0-0 -B 0-0 -O 0-70 -C 0-100 -N 0-0 -P 0-0 -K 0-0 -F 0-0 -L 0-0 -H 0-200 -1 0-0

ID from inputMass (m/z)FormulaCompound MW (Da)DeltaTotal
mass_0188.0521
C4H8O288.0524295-0.43

Valid CSS!

Copyright © INRAE, N Paulhe, L Pavot, F Giacomoni 2023

\ No newline at end of file diff -r e2cbcf6fa22e -r 23970530a518 test-data/out4.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out4.html Tue Jan 17 10:31:32 2023 +0000 @@ -0,0 +1,1 @@ +Galaxy HR2 queries - All results
Results of HR elucidation queries - Mode used: positive / Charge: +1 / Mass tolerance: 1.0 / Composition: -F 0-0 -O 0-70 -1 0-0 -P 0-10 -S 0-10 -C 0-100 -A 0-10 -H 0-200 -N 0-40 -L 0-0 -K 0-0 -B 0-0

ID from inputMass (m/z)FormulaCompound MW (Da)DeltaTotal
165144.08411
C7H13N1S1143.0768701-0.05
1664328.138715
C12H13N11O1327.13045410.97
C15H21N1O7327.1318020-0.38
C14H18N5O3Na1327.13073380.69
C17H19N3O1Na2327.1323508-0.93
C10H18N9O2P1327.1321075-0.68
C9H22N5O6P1327.13077010.65
C12H23N3O4Na1P1327.1323872-0.96
C11H20N7Na2P1327.13131890.10
C13H25N1O2Na3P1327.1315985-0.17
C19H23N1P2327.13057300.85
C7H18N11O1Na1S1327.13141920.00
C9H23N5O3Na2S1327.1316989-0.28
C10H25N3O1Na4S1327.13091030.51
C14H28N1Na1P2S1327.1315381-0.11
C10H26N5O1P1S2327.1316385-0.21
1270276.12606
C6H15N9O1Na2275.1194947-0.77
C14H18N3O1P1275.1187488-0.03
C10H24N1O2Na1P2275.11799660.73
C12H21N1O4S1275.1191289-0.41
C11H18N5Na1S1275.11806060.66
C9H23N3O1Na1P1S1275.1197140-0.99
961242.09967
C7H11N7O3241.0923373-0.01
C9H16N1O5Na1241.0926169-0.29
C8H13N5O1Na2241.09154860.77
C6H18N3O2Na2P1241.0932020-0.88
C15H15N1S1241.0925202-0.20
C7H21N3P2S1241.0931416-0.82
C7H19N3O2S2241.09186820.46

Valid CSS!

Copyright © INRAE, N Paulhe, L Pavot, F Giacomoni 2023

\ No newline at end of file diff -r e2cbcf6fa22e -r 23970530a518 test-data/out4.tabular --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/out4.tabular Tue Jan 17 10:31:32 2023 +0000 @@ -0,0 +1,5 @@ +Code mz formula hr2 +165 144.0841 C7H13NS -0.05::(C7H13N1S1)::143.0768701 +1664 328.1387 " C15H21NO7" 0.97::(C12H13N11O1)::327.1304541|-0.38::(C15H21N1O7)::327.1318020|0.69::(C14H18N5O3Na1)::327.1307338|-0.93::(C17H19N3O1Na2)::327.1323508|-0.68::(C10H18N9O2P1)::327.1321075|0.65::(C9H22N5O6P1)::327.1307701|-0.96::(C12H23N3O4Na1P1)::327.1323872|0.10::(C11H20N7Na2P1)::327.1313189|-0.17::(C13H25N1O2Na3P1)::327.1315985|0.85::(C19H23N1P2)::327.1305730|0.00::(C7H18N11O1Na1S1)::327.1314192|-0.28::(C9H23N5O3Na2S1)::327.1316989|0.51::(C10H25N3O1Na4S1)::327.1309103|-0.11::(C14H28N1Na1P2S1)::327.1315381|-0.21::(C10H26N5O1P1S2)::327.1316385 +1270 276.1260 C12H21SNO4 -0.77::(C6H15N9O1Na2)::275.1194947|-0.03::(C14H18N3O1P1)::275.1187488|0.73::(C10H24N1O2Na1P2)::275.1179966|-0.41::(C12H21N1O4S1)::275.1191289|0.66::(C11H18N5Na1S1)::275.1180606|-0.99::(C9H23N3O1Na1P1S1)::275.1197140 +961 242.0996 C9H17NO5Na -0.01::(C7H11N7O3)::241.0923373|-0.29::(C9H16N1O5Na1)::241.0926169|0.77::(C8H13N5O1Na2)::241.0915486|-0.88::(C6H18N3O2Na2P1)::241.0932020|-0.20::(C15H15N1S1)::241.0925202|-0.82::(C7H21N3P2S1)::241.0931416|0.46::(C7H19N3O2S2)::241.0918682