From 96a90a50724914e2b1c0eeca0e4cc5831c4d24a2 Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Fri, 5 Oct 2007 00:47:35 +0000 Subject: [PATCH] Get path for twoBitToFa binary from path of executing script. Should this binary be part of the distribution? --- tools/extract/twoBitToFa_wrapper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/extract/twoBitToFa_wrapper.py b/tools/extract/twoBitToFa_wrapper.py index 0654aef0cf8..98d356cf57a 100755 --- a/tools/extract/twoBitToFa_wrapper.py +++ b/tools/extract/twoBitToFa_wrapper.py @@ -67,7 +67,9 @@ else: end = fields[int(end_col)-1] #Run twoBitToFa program tmpfile = tempfile.NamedTemporaryFile() - cmdline = "tools/extract/twoBitToFa " + filepath.strip() + " " + tmpfile.name + " -seq=" + name + " -start=" + start + " -end=" + end + " > /dev/null 2>&1" + two_bit_cmd = os.path.join(os.path.split(sys.argv[0])[0], "twoBitToFa") + cmdline = two_bit_cmd + " " + filepath.strip() + " " + tmpfile.name + " -seq=" + name + " -start=" + start + " -end=" + end + " > /dev/null 2>&1" + #cmdline = "tools/extract/twoBitToFa " + filepath.strip() + " " + tmpfile.name + " -seq=" + name + " -start=" + start + " -end=" + end + " > /dev/null 2>&1" os.system(cmdline) header = tmpfile.readline() seq = tmpfile.read()