Skip to content

Commit b694236

Browse files
committed
Structure_threader can now use a fastStructure binary.
1 parent f741ed6 commit b694236

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

structure_threader/structure_threader.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def runprogram(wrapped_prog, iterations):
6666
file_format = "bed"
6767
infile = arg.infile[:-4]
6868
else:
69-
file_format = "str" # Assume str format if plink is not specified
69+
file_format = "str" # Assume 'STR' format if plink is not specified
7070
if arg.infile.endswith(".str") is False: # Do we need a symlink?
7171
from os import symlink
7272
try:
@@ -76,9 +76,15 @@ def runprogram(wrapped_prog, iterations):
7676
raise
7777
infile = arg.infile[:-4]
7878

79+
7980
cli = ["python2", arg.faststructure_bin, "-K", str(K), "--input",
8081
infile, "--output", output_file, "--format", file_format]
8182

83+
# Are we using the python script or a binary?
84+
if arg.faststructure_bin.endswith(".py") is False:
85+
cli = cli[1:]
86+
87+
8288
print("Running: " + " ".join(cli))
8389
program = subprocess.Popen(cli, bufsize=64, shell=False,
8490
stdout=subprocess.PIPE,

0 commit comments

Comments
 (0)