[Phylobase-devl] NCL and Mr. Bayes output

Peter Cowan pdc at berkeley.edu
Sun Apr 13 05:54:46 CEST 2008


Hi all,

I'm trying to read in some Mr. Bayes output and I'm having difficulty  
using the NCL commands.  They appear to work fine for reading in trees  
written with the ape write.nexus() command.  However, I have some  
output sent by a colleague that is Mr. Bayes output, I get an error  
similar to this one:

NexusToPhylo4('temptrees.nex', multi = TRUE)
Error in strsplit(unlist(X), c("\n")) : non-character argument

Enter a frame number, or 0 to exit

1: NexusToPhylo4("temptrees.nex", multi = TRUE)
2: read.nexustreestring(intreesstring)
3: unlist(strsplit(unlist(X), c("\n")))
4: strsplit(unlist(X), c("\n"))


Opening temptrees.nex...
Reading TAXA block...
Reading TREES block...

[&W 0.000133] is not a valid command comment in a TREE command
Line:   32
Column: 54

Here is an example that causes this issue.  Does anyone know if this  
*is* improper Nexus?  We might need a work around as it seems likely  
that folks will want to read these files in (I do!).

Thanks

Peter

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#NEXUS
[R-package APE, Sat Apr 12 20:43:49 2008]

BEGIN TAXA;
	DIMENSIONS NTAX = 10;
	TAXLABELS
		t10
		t6
		t1
		t2
		t3
		t7
		t4
		t8
		t9
		t5
	;
END;
BEGIN TREES;
	TRANSLATE
		1	t10,
		2	t6,
		3	t1,
		4	t2,
		5	t3,
		6	t7,
		7	t4,
		8	t8,
		9	t9,
		10	t5
	;
	TREE * tree_1 [p = 0.000, P = 0.000] = [&W 0.000133] ((1:0.4216983311, 
(2:0.296520697,3:0.296520697):0.1251776341):0.4759863847, 
(((4:0.04783879614,(5:0.01765025055,6:0.01765025055):0.03018854558): 
0.1309033622,7:0.1787421584):0.2551763398, 
((8:0.005332820355,9:0.005332820355):0.2364533074,10:0.2417861278): 
0.1921323704):0.4637662177);
	TREE * tree_2 [p = 0.000, P = 0.000] = [&W 0.000133]  
(((((7:0.04883758292,8:0.04883758292):0.00217534208,10:0.051012925): 
0.1472300602,6:0.1982429852):0.25455756,(5:0.3552340554, 
((4:0.08498402587,1:0.08498402587):0.0246625582, 
(9:0.05179131039,2:0.05179131039):0.05785527368):0.2455874714): 
0.09756648975):1.242550755,3:1.6953513);
	TREE * tree_3 [p = 0.000, P = 0.000] = [&W 0.000133] ((1:0.7445906261, 
((((3:0.05081146765,8:0.05081146765):0.1831808682,6:0.2339923359): 
0.2378007847,7:0.4717931206):0.266628794,(10:0.09147718106, 
((4:0.01595386789,9:0.01595386789):0.02646381434,5:0.04241768223): 
0.04905949882):0.6469447336):0.006168711465):1.033527905,2:1.778118531);
END;



More information about the Phylobase-devl mailing list