I’m attempting to spawn multiple mothur processes and am running into this issue:
The command I’m issuing in the code is:
/common/mothur-v.1.6.0/mothur "#read.dist(phylip=/home/cfriedline/bnfo/OTUProcessor/Sample0016_phylip_dist.txt); cluster(); rarefaction.single(); summary.single()"
What I get back is this:
Error: Could not open "#read.dist(phylip=/home/cfriedline/bnfo/OTUProcessor/Sample0016_phylip_dist.txt);
unable to open batchfile
If I just copy/paste this code into a terminal, it runs fine. Is there something inherent to mothur that makes it not amenable to this type of thing?
There’s nothing in mothur that should cause a problem. I’ve done similar things with Perl scripts and there have been no problems. Let us know if there’s anything we can do to help out.
I am experiencing a similar problem but this time with running mothur from inside of python. I tried both running it directly within an os.system command, which executes the command in a subshell. I then got the message “Unable to open” the things that I wrote within the “”, i.e. the mothur commands, and then “unable to open batchfile”. I next tried writing the commands to a file, which I then ran in batch mode from python with os.system. In this case I get a notice that the batch file is empty.
Could you show how you do this in perl, so I can use this to debug?