Entering edit mode
18 months ago
Alon
•
0
I want to run FUBAR from a python script and redirect the output to a text file so that I can perform some additional analysis on it. I have this working line of code:
os.system("echo `(echo '1'; echo '4'; echo '/myfile.fasta'; echo '/myfile.nwk') | hyphy `")
How do I modify it to redirect the output to a text file in the same directory?
Thank you for your comment. I'm aware that subprocess is preferred these days but it is more complicated and I think os.system is good enough for this purpose.