Commit f56f3c64 authored by RyanHerb's avatar RyanHerb

task.py fix some pre_process changes

In d67262 the DIR_PEAR variable was applied incorrectly.
Instead, we now pass the pear directory to the pear.py script

closes #2051
parent d6726287
......@@ -686,12 +686,12 @@ def run_pre_process(pre_process_id, sequence_file_id, clean_before=True, clean_a
output_file = out_folder+'/'+output_filename
pre_process = db.pre_process[pre_process_id]
cmd = 'python ' + defs.DIR_PEAR + pre_process.command.replace( "&file1&", defs.DIR_SEQUENCES + sequence_file.data_file)
cmd = pre_process.command.replace( "&file1&", defs.DIR_SEQUENCES + sequence_file.data_file)
if sequence_file.data_file2:
cmd = cmd.replace( "&file2&", defs.DIR_SEQUENCES + sequence_file.data_file2)
cmd = cmd.replace( "&result&", output_file)
cmd = cmd.replace("&pear&", defs.DIR_PEAR)
print "=== Pre-process %s ===" % pre_process_id
print cmd
......
......@@ -10,6 +10,7 @@ import os
parser = argparse.ArgumentParser(description='Use PEAR read merger to make a new fastq file and keep unmerged reads')
parser.add_argument("pear_dir", help="path to pear executable")
parser.add_argument("file_R1", help="reverse read file")
parser.add_argument("file_R2", help="forward read file")
parser.add_argument("output_file", help="output file")
......@@ -25,7 +26,7 @@ f_r2 = args.file_R2
f_out = args.output_file
exit_code = subprocess.call(["pear",
exit_code = subprocess.call(['%s/pear' % args.pear_dir,
"-f", f_r1,
"-r", f_r2,
"-o", f_out,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment