Mercurial > repos > trinity_ctat > align_and_estimate_abundance
comparison trinityToolWrapper.py @ 8:28f6d3b8e931 draft
Adjusting requirements.
| author | trinity_ctat | 
|---|---|
| date | Tue, 26 Sep 2017 14:54:33 -0400 | 
| parents | 78d12a725443 | 
| children | b6152cc26ffd | 
   comparison
  equal
  deleted
  inserted
  replaced
| 7:78d12a725443 | 8:28f6d3b8e931 | 
|---|---|
| 22 # I tried using "command -v Trinity" but for some reason, I was getting a OS permission error with that. | 22 # I tried using "command -v Trinity" but for some reason, I was getting a OS permission error with that. | 
| 23 # I just found distutils.spawn.find_executable() which might work, but already implemented the below. | 23 # I just found distutils.spawn.find_executable() which might work, but already implemented the below. | 
| 24 try: | 24 try: | 
| 25 pipe1 = subprocess.Popen(["which", "Trinity"], stdout=subprocess.PIPE) | 25 pipe1 = subprocess.Popen(["which", "Trinity"], stdout=subprocess.PIPE) | 
| 26 except: | 26 except: | 
| 27 msg = "You must set the environmental variable TRINITY_HOME to the base installation directory of Trinity before running {:s}.".format(sys.argv[0]) | |
| 28 sys.stderr.write(msg) | |
| 27 t, v, tb = sys.exc_info() | 29 t, v, tb = sys.exc_info() | 
| 28 sys.stderr.write("You must set the environmental variable TRINITY_HOME to the base installation directory of Trinity before running {:s}.".format(sys.argv[0])) | |
| 29 raise t, v, tb | 30 raise t, v, tb | 
| 30 else: | 31 else: | 
| 31 TrinityPath, err_info = pipe1.communicate() | 32 TrinityPath, err_info = pipe1.communicate() | 
| 32 # FIX - probably should be checking err_info for errors... | 33 # FIX - probably should be checking err_info for errors... | 
| 33 # Determine the TRINITY_BASE_DIR from output1. | 34 # Determine the TRINITY_BASE_DIR from output1. | 
