Mercurial > repos > trinity_ctat > align_and_estimate_abundance
changeset 10:a8fa525a2f30 draft
Trying to fix a syntax error.
author | trinity_ctat |
---|---|
date | Tue, 26 Sep 2017 22:26:13 -0400 |
parents | b6152cc26ffd |
children | 2e0e45063fad |
files | trinityToolWrapper.py |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/trinityToolWrapper.py Tue Sep 26 15:14:48 2017 -0400 +++ b/trinityToolWrapper.py Tue Sep 26 22:26:13 2017 -0400 @@ -24,12 +24,12 @@ try: pipe1 = subprocess.Popen(["which", "Trinity"], stdout=subprocess.PIPE) except: - msg = "You must set the environmental variable TRINITY_HOME to the base installation directory of Trinity before running {:s}.".format(sys.argv[0]) + msg = "You must set the environmental variable TRINITY_HOME to the base installation directory of Trinity before running {:s}.\n".format(sys.argv[0]) sys.stderr.write(msg) # t, v, tb = sys.exc_info() # raise t, v, tb # For some reason the above was giving a syntax error. - # A simple raise shoudl reraise the existing exception. + # A simple raise should reraise the existing exception. raise else: TrinityPath, err_info = pipe1.communicate() @@ -40,12 +40,13 @@ # print "Trinity that was found is: {:s}".format(repr(TrinityPath)) # print os.path.islink(TrinityPath) TrinityPath = os.path.abspath(TrinityPath) - print "The Absolute Trinity path that was found is: {:s}".format(TrinityPath) + # msg = "The Absolute Trinity path that was found is: {:s}".format(TrinityPath) + # print msg # print os.path.islink(TrinityPath) while os.path.islink(TrinityPath): - print "That path is a link." + # print "That path is a link." TrinityPath = os.path.join(os.path.dirname(TrinityPath),os.readlink(TrinityPath)) - print "The new path is: {:s}".format(TrinityPath) + # print "The new path is: {:s}".format(TrinityPath) # Take off the last part of the path (which is the Trinity command) TRINITY_BASE_DIR = "/".join(TrinityPath.split("/")[0:-1]) else: