Browse Source

Fixed paths, displays formatter command for debugging purposes

E.Cannon 9 years ago
parent
commit
714f791a1e
1 changed files with 8 additions and 7 deletions
  1. 8 7
      api/blast_ui.api.inc

+ 8 - 7
api/blast_ui.api.inc

@@ -107,12 +107,11 @@ function get_blast_database_options($type) {
  *   BLAST job (ie: 250)
  */
 function run_BLAST_tripal_job($program, $query, $database, $output_filestub, $options, $job_id = NULL) {
-
- $output_file = file_directory_temp() .  DIRECTORY_SEPARATOR . $output_filestub . '.blast.asn';
- $output_file_xml = variable_get('file_public_path', conf_path() . '/files') . DIRECTORY_SEPARATOR . $output_filestub . '.blast.xml';
- $output_file_tsv = variable_get('file_public_path', conf_path() . '/files') . DIRECTORY_SEPARATOR . $output_filestub . '.blast.tsv';
- $output_file_html = variable_get('file_public_path', conf_path() . '/files') . DIRECTORY_SEPARATOR . $output_filestub . '.blast.html';
-
+  $output_file = file_directory_temp() .  DIRECTORY_SEPARATOR . $output_filestub . '.blast.asn';
+  $output_dir = variable_get('file_public_path', conf_path() . '/files') . DIRECTORY_SEPARATOR . 'tripal' . DIRECTORY_SEPARATOR . 'tripal_blast';
+  $output_file_xml = $output_dir . DIRECTORY_SEPARATOR . $output_filestub . '.blast.xml';
+  $output_file_tsv = $output_dir . DIRECTORY_SEPARATOR . $output_filestub . '.blast.tsv';
+  $output_file_html = $output_dir . DIRECTORY_SEPARATOR . $output_filestub . '.blast.html';
 
   print "\nExecuting $program\n\n";
   print "Query: $query\n";
@@ -155,7 +154,9 @@ function run_BLAST_tripal_job($program, $query, $database, $output_filestub, $op
   print "\nGenerating additional download formats...\n";
 
   print "\tXML\n";
-  system("$blast_formatter_command -archive $output_file -outfmt 5 -out $output_file_xml");
+  $format_cmd = "$blast_formatter_command -archive $output_file -outfmt 5 -out $output_file_xml";
+  print "\nExecuting $format_cmd\n\n";
+  system($format_cmd);
   if(!file_exists($output_file_xml)) {
     tripal_report_error(
       'blast_ui',