Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SOaAS
psot.repository
Commits
0a11c872
Commit
0a11c872
authored
Feb 07, 2018
by
Lukas Jelonek
Browse files
Fix bug: adapt targetp runner to new helpers path
parent
4f316a5c
Changes
2
Show whitespace changes
Inline
Side-by-side
psot/scripts/convert_targetp.py
View file @
0a11c872
...
...
@@ -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'
])
psot/scripts/run_targetp.py
View file @
0a11c872
...
...
@@ -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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment