I am using the program GTDBtk, a tool kit that uses other programs. When I ran GTDBtk using the terminal it gave me an error:
[2020-03-15 18:58:22] INFO: Using GTDB-Tk reference data version r89: /Users/Desktop/GTDB/gtdbtk/release89
hmmsearch is not on the system path.
I solved this problem by writing this code
PATH="/Users/monkiky/Desktop/Data/hmmer-3.3/src/hmmsearch:$PATH"
Now, due to I need to run this program several times, I am writing a script in Python. Writing this code I have found the same error and I do not know how to solve it.
[2020-03-21 11:26:37] INFO: Using GTDB-Tk reference data version r89: /Users/monkiky/Desktop/GTDB/gtdbtk/release89
hmmsearch is not on the system path.
How can I define the path using python? or what I am doing wrong.
I have tried this with not lucky:
os.system('PATH="/Users/monkiky/Desktop/Data/hmmer-3.3/src/hmmsearch:$PATH"')
Here my completed coded:
#Define directory
os.chdir('/Users/monkiky/Desktop/prueba/GTDBTk-1.0.1')
# We define the environment variable
os.environ['GTDBTK_DATA_PATH'] = "/Users/monkiky/Desktop/GTDB/gtdbtk/release89"
# Add the path of prodigal (here the problem bust be)
sys.path.append("/Users/monkiky/Desktop/GTDB/GTDBTk-1.0.1/hmmsearch")
#Run the program
os.system('gtdbtk identify --genome_dir /Users/monkiky/Desktop/GTDB/input --out_dir /Users/monkiky/Desktop/GTDB/prueba')
output
2020-03-21 14:29:09] INFO: GTDB-Tk v1.0.2
[2020-03-21 14:29:09] INFO: gtdbtk identify --genome_dir /Users/monkiky/Desktop/GTDB/input --out_dir /Users/monkiky/Desktop/GTDB/prueba
[2020-03-21 14:29:09] INFO: Using GTDB-Tk reference data version r89: /Users/monkiky/Desktop/GTDB/gtdbtk/release89
hmmsearch is not on the system path.
[2020-03-21 14:29:09] ERROR: Controlled exit resulting from early termination.
<built-in function chdir>