More about MrBayes
Some (more) notes about the venerable Bayesian reconstruction program.
Error when setting parameter "Gap" (2)
When attempting to execute a Nexus file, MrBayes kept spitting back this cryptic error upon loading:
Executing file "c_vp1_nuc_seqs.nxs" [...] Reading data block Allocated matrix [...] Data is Dna Gap character matches matching or missing characters Error when setting parameter "Gap" (2) Error in command "Execute"
In the header of the data block, there was a elementary error that escaped my eye:
BEGIN DATA; dimensions ntax=48 nchar=417; format missing=N interleave=yes datatype=DNA gap=N;
That is, both gap and missing data were set to N. Once corrected, things ran fine.
Missing readline
It's surprising how many unix systems don't have readline (which MrBayes can use for nicer command editing). If during compilation you get this error::
% make gcc -DUNIX_VERSION -DUSE_READLINE -O3 -Wall -c -o mb.o mb.c gcc -DUNIX_VERSION -DUSE_READLINE -O3 -Wall -c -o mcmc.o mcmc.c gcc -DUNIX_VERSION -DUSE_READLINE -O3 -Wall -c -o bayes.o bayes.c [...] bayes.c:316: warning: implicit declaration of function `add_history' bayes.c: In function `readline_completion': bayes.c:386: warning: implicit declaration of function `rl_completion_matches' bayes.c:386: warning: assignment makes pointer from integer without a cast make: *** [bayes.o] Error 1
or other complaints about rl_completion_matches, this means you can't find readline. Go to your Makefile, about 20 lines down find the lines that automatically include readline and change "yes" to "no":
ifeq ($(strip $(ARCHITECTURE)), unix) USEREADLINE ?= yes else USEREADLINE ?= no endif