diff hr2_manager.pl @ 2:23970530a518 draft

master branch Updating with tag :CI_COMMIT_TAG - - Fxx
author fgiacomoni
date Tue, 17 Jan 2023 10:31:32 +0000
parents e2cbcf6fa22e
children 78afd7f439f3
line wrap: on
line diff
--- 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" ;