Commit 0a11c872 authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix bug: adapt targetp runner to new helpers path

parent 4f316a5c
......@@ -4,6 +4,7 @@ import sys
import json
import argparse
from os import path
from psot import config
import subprocess
parser = argparse.ArgumentParser(description='Convert targetp results to json document')
......@@ -57,5 +58,5 @@ with open(output_filename, 'w') as o:
json.dump(documents, o)
# Replace sequences' enumerated ids with their original ids
restore_seq_ids_tool = path.dirname(__file__) + '/restore_seq_id_from_enumeration.py'
restore_seq_ids_tool = config.load_config()['helpers_path'] + '/restore_seq_id_from_enumeration.py'
subprocess.run([restore_seq_ids_tool, '-j', output_filename, '-e', args.result + '/enum_headers.tsv'])
......@@ -5,7 +5,8 @@ from psot import config
from os import system,makedirs,path
import subprocess
targetp_tool = config.load_config()['tools'].get('targetp', 'targetp')
cfg = config.load_config()
targetp_tool = cfg['tools'].get('targetp', 'targetp')
org_flags = {'plant': '-P', 'non-plant': '-N'}
......@@ -18,7 +19,7 @@ args = parser.parse_args()
makedirs(args.output, exist_ok=True)
# Swap fasta headers for unique numbers to avoid truncation
reduce_headers_tool = path.dirname(__file__) + '/reduce_fasta_headers_to_enumeration.py'
reduce_headers_tool = cfg['helpers_path'] + '/reduce_fasta_headers_to_enumeration.py'
subprocess.run([reduce_headers_tool, "-f", args.fasta, "-e", args.output + '/enum_headers.tsv'])
results_file = args.output + '/results.txt'
......
Supports Markdown
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