I wrote a nexus file with a mrbayes block for executing mrbayes in batch, but how can I get this script to execute as part of a workflow?
For example if I have a bash script that says
Execute example.nex
or
mb
Execute example.nex
it doesn't work. How do I get mrbayes to execute autonomously?
1 answer
First you need to decide how you want to run MrBayes. If you type only mb (or mpirun -n #processors mb-mpi for multithreaded run), you are entering the interactive mode. It should give you a MrBayes > prompt. Once there, type execute example.nex and that will get things going unless there is an error. The program will tell you the exact line where the error occurred if something is wrong - you should report that message.
In command-line mode, you type:
mb example.nex > example.nex.log &
or
mpirun -n #processors mb-mpi example.nex > example.nex.log & (for MPI version)
Log in to answer this question.
Please explain "it doesn't work" (how it doesn't work? error messages?), and try to provide a simple example illustrating the issue. Did you read How do I run MrBayes in batch mode?