Mercurial > repos > fgiacomoni > hr2
comparison hr2_manager.pl @ 1:e2cbcf6fa22e draft
master branch Updating with tag :CI_COMMIT_TAG - - Fxx
author | fgiacomoni |
---|---|
date | Sun, 11 Dec 2022 17:16:43 +0000 |
parents | 86296c048e46 |
children | 23970530a518 |
comparison
equal
deleted
inserted
replaced
0:86296c048e46 | 1:e2cbcf6fa22e |
---|---|
1 #!perl | 1 #!perl |
2 | 2 |
3 ## script : hr2_manager.pl | 3 ## script : hr2_manager.pl |
4 ## VERSIONS : | 4 ## VERSIONS : |
5 # - 01/03/2019 : Fix P issue, permit more flexible atom settings and add requirements for conda auto managing. | 5 # - 01/03/2019 : Fix P issue, permit more flexible atom settings and add requirements for conda auto managing. |
6 # - 09/12/2022 : Fix "Additional atomes not taken into account" - Ticket issue #7 | |
6 | 7 |
7 #============================================================================= | 8 #============================================================================= |
8 # Included modules and versions | 9 # Included modules and versions |
9 #============================================================================= | 10 #============================================================================= |
10 ## Perl modules | 11 ## Perl modules |
45 "masse:s" => \$mass, | 46 "masse:s" => \$mass, |
46 "tolerance:f" => \$tolerance, | 47 "tolerance:f" => \$tolerance, |
47 "mode:s" => \$mode, | 48 "mode:s" => \$mode, |
48 "charge:i" => \$charge, | 49 "charge:i" => \$charge, |
49 "regleOr:s" => \$has_golden_rules, | 50 "regleOr:s" => \$has_golden_rules, |
50 "atomes:s" => \$atomes_basic, # [basic atoms like CNOHP] | 51 "atomes_basic:s"=> \$atomes_basic, # [basic atoms like CNOHP] |
51 "atomessup:s" => \$atomes, | 52 "atomes_sup:s" => \$atomes, |
52 "output1:s" => \$output_csv, | 53 "output1:s" => \$output_csv, |
53 "outputView:s" => \$output_html, | 54 "outputView:s" => \$output_html, |
54 "verbose:i" => \$verbose, | 55 "verbose:i" => \$verbose, |
55 ) ; | 56 ) ; |
56 | 57 |
188 if ( ( defined $output_html ) and ( defined $parsed_results ) ) { | 189 if ( ( defined $output_html ) and ( defined $parsed_results ) ) { |
189 my $oHtml = lib::hr::new() ; | 190 my $oHtml = lib::hr::new() ; |
190 my ($tbody_object) = $oHtml->set_html_tbody_object( $nb_pages_for_html_out, $CONF->{HTML_ENTRIES_PER_PAGE} ) ; | 191 my ($tbody_object) = $oHtml->set_html_tbody_object( $nb_pages_for_html_out, $CONF->{HTML_ENTRIES_PER_PAGE} ) ; |
191 ($tbody_object) = $oHtml->add_mz_to_tbody_object($tbody_object, $CONF->{HTML_ENTRIES_PER_PAGE}, $masses, $ids, $parsed_results ) ; | 192 ($tbody_object) = $oHtml->add_mz_to_tbody_object($tbody_object, $CONF->{HTML_ENTRIES_PER_PAGE}, $masses, $ids, $parsed_results ) ; |
192 ($tbody_object) = $oHtml->add_entries_to_tbody_object($tbody_object, $parsed_results) ; | 193 ($tbody_object) = $oHtml->add_entries_to_tbody_object($tbody_object, $parsed_results) ; |
194 | |
195 print Dumper $tbody_object ; | |
196 | |
193 my $html_file = $binPath.'/'.$CONF->{'HTML_TEMPLATE'} ; | 197 my $html_file = $binPath.'/'.$CONF->{'HTML_TEMPLATE'} ; |
194 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'}) ; | 198 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'}) ; |
195 | 199 |
196 } ## END IF | 200 } ## END IF |
197 else { | 201 else { |
268 print STDERR " | 272 print STDERR " |
269 hr2_manager.pl | 273 hr2_manager.pl |
270 | 274 |
271 # hr2_manager is a script to elucide chemical formula by their accurate masses. The HiRes program is integrate in this package | 275 # hr2_manager is a script to elucide chemical formula by their accurate masses. The HiRes program is integrate in this package |
272 # Input : a accurate mass or a file of masses | 276 # Input : a accurate mass or a file of masses |
273 # Author : Franck Giacomoni and Marion Landi | 277 # Authors : Lain Pavot, Marion Landi and Franck Giacomoni |
274 # Email : fgiacomoni\@clermont.inra.fr or mlandi\@clermont.inra.fr | 278 # Email : franck.giacomoni\@inrae.fr |
275 # Version : 1.1 | 279 # Version : 1.1.2 |
276 # Created : 01/12/2011 | 280 # Created : 01/12/2011 |
277 # Last Update : 09032014 | 281 # Last Update : 06/12/2022 |
278 USAGE : | 282 USAGE : |
279 hr2_manager.pl -h or | 283 hr2_manager.pl -h or |
280 hr2_manager.pl -input [cvs file of masses] -colId [int] -colmass [int] -nbHeader [int] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atome [P, S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] | 284 hr2_manager.pl -input [cvs file of masses] -colId [int] -colmass [int] -nbHeader [int] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atome [P, S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] |
281 hr2_manager.pl -masse [double] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atome [P, S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] | 285 hr2_manager.pl -masse [double] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atomes_basic [C, N, O, P, H ] -atomes_sup [S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] |
282 " ; | 286 " ; |
283 exit(1); | 287 exit(1); |
284 } | 288 } |
285 | 289 |
286 ## END of script - F Giacomoni | 290 ## END of script - F Giacomoni |
292 hr2_manager.pl -- script for launch / manage hr2 binary | 296 hr2_manager.pl -- script for launch / manage hr2 binary |
293 | 297 |
294 =head1 USAGE | 298 =head1 USAGE |
295 | 299 |
296 hr2_manager.pl -h or | 300 hr2_manager.pl -h or |
297 hr2_manager.pl -input [cvs file of masses] -colId [int] -colmass [int] -nbHeader [int] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atome [P, S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] | 301 hr2_manager.pl -input [cvs file of masses] -colId [int] -colmass [int] -nbHeader [int] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atomes_basic [C, N, O, P, H ] -atomes_sup [S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] |
298 hr2_manager.pl -masse [double] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atome [P, S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] | 302 hr2_manager.pl -masse [double] -tolerance [float] -mode [positive, neutral or negative] -charge [int] -regleOr [yes or no] -atomes_basic [C, N, O, P, H ] -atomes_sup [S, F, Cl, K, B, A, 1 ] -output1 [csv file] -outputView [html file] |
299 | 303 |
300 =head1 SYNOPSIS | 304 =head1 SYNOPSIS |
301 | 305 |
302 This script manages hr2 binary which elucids raw formula with exact masses. | 306 This script manages hr2 binary which elucids raw formula with exact masses. |
303 | 307 |
313 | 317 |
314 =back | 318 =back |
315 | 319 |
316 =head1 AUTHOR | 320 =head1 AUTHOR |
317 | 321 |
318 Franck Giacomoni E<lt>franck.giacomoni@clermont.inra.frE<gt> | 322 Franck Giacomoni E<lt>franck.giacomoni@inrae.frE<gt> |
319 Marion Landi E<lt>marion.landi@clermont.inra.frE<gt> | 323 Marion Landi E<lt>marion.landi@inrae.frE<gt> |
324 Lain Pavot E<lt>lain.pavot@inrae.frE<gt> | |
320 | 325 |
321 =head1 LICENSE | 326 =head1 LICENSE |
322 | 327 |
323 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. | 328 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
324 | 329 |
330 | 335 |
331 version 3 : 20/02/2014 | 336 version 3 : 20/02/2014 |
332 | 337 |
333 version 4 : 01/03/2019 | 338 version 4 : 01/03/2019 |
334 | 339 |
340 version 5 : 09/12/2022 | |
341 | |
335 =cut | 342 =cut |