Commit 4f316a5c authored by Lukas Jelonek's avatar Lukas Jelonek
Browse files

Fix bug: adapt ghostx runner to new helpers path

parent fce52ed3
#!/usr/bin/python3
#!/usr/bin/env python3
import sys
import json
import argparse
from os import path
from psot import config
import subprocess
parser = argparse.ArgumentParser(description='Convert ghostx results to json documents')
......@@ -60,5 +61,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'])
......@@ -7,7 +7,8 @@ from psot import config
import subprocess
import json
ghostx_tool = config.load_config()['tools'].get('ghostx', 'ghostx')
cfg = config.load_config()
ghostx_tool = cfg['tools'].get('ghostx', 'ghostx')
parser = argparse.ArgumentParser(description='Identify homologues in the swissprot database')
parser.add_argument('--fasta', '-f', required=True, help='A fasta file with aminoacid sequences')
......@@ -18,7 +19,7 @@ args = parser.parse_args()
makedirs(args.output, exist_ok=True)
# Swap fasta headers for unique numbers to save ghostx from dealing with complex headers
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'])
# Aproach:
......
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