R Hackathon 1/Current Data Representations

From Phyloinformatics
Jump to: navigation, search

On this page, for the test set of sample trees and datasets and any other relevant files, describe success/failure in loading the file, any information lost, and how the objects are represented in R (pending a different/better idea, we could use a similar format as used for the 'phylo' class (pdf) or the scheme for coding nucleotides (pdf)).

Summary

Package altnexus_simple.tre altnexus_treewts.tre nexus_rooted_brlen.tre nexus_simple.tre notes_multitrees.nex (has labels and notes) phylip.tre samplefile.nex (has trees and data)
ape ok WEIGHTS NOT STORED, BUT NO ERROR MESSAGE ok ok

WILL NOT LOAD

> notes_multitrees<-read.nexus(file="notes_multitrees.nex")
Error in edge[j, 1] <<- current.node : subscript out of bounds
ok tree ok, DATA WILL NOT LOAD
> samplefiledata<-read.nexus.data(file="samplefile.nex")
Error in read.nexus.data(file = "samplefile.nex") : 
	nexus parser does not handle spaces in sequences or taxon names 
(ts>2)
ade4 (1) ok ok but no weights tree ok, but labels of taxa not stored tree ok, but labels of taxa not stored tree 1 failed , others are ok but labels not stored trees ok trees ok, no data
apTreeshape

?

?

?

?

?

?

?

ComPairWise

?

?

?

?

?

?

?

Geiger

All answers are identical to ape, package relies on the ape loading functions.


Laser

Relies on ape loading functions.

?

?

?

?

?

?

OUCH

formats loaded using ape can be transferred to ouch format using ape2ouch function

?

?

?

?

?

?

PaleoTS

?

?

?

?

?

?

?

PhyloGR

?

?

?

?

?

?

?

PhySim

?

?

?

?

?

?

?

Picante

All answers are identical to ape, package relies on the ape loading functions.


(1) no import from files : trees are copied/pasted as character strings to R and then converted.

DPUT files (created using dput command, then using indents and line feeds to make the structure more readable)

File ape ade4 apTreeshape ComPairWise Geiger Laser OUCH PaleoTS PhyloGR PhySim
altnexus_simple.tre
structure(
	list(
		edge = structure(
			c(8, 9, 10, 10, 9, 11, 11, 8, 12, 12, 13, 13, 9, 10, 1, 2, 11, 3, 4, 12, 5, 13, 6, 7),
			.Dim = c(12L, 2L)
		), 
		tip.label = c("taxon_1", "taxon_3", "taxon_2", "taxon_6", "taxon_4", "taxon_5", "taxon_7"), 
		Nnode = 6L
	), 
	.Names = c("edge", "tip.label", "Nnode"),
	class = "phylo", 
	origin = "/Users/bcomeara/Desktop/RHackTrees/altnexus_simple.tre"
)
?
?
?
?
?
?
?
?
?
altnexus_treewts.tre NOTE LACK OF WEIGHTS
structure(
	list(
		tree1 = structure(
			list(
				edge = structure(
					c(8, 8, 9, 10, 10, 11, 11, 9, 12, 12, 8, 1, 9, 10, 2, 11, 3, 4, 12, 5, 6, 7), 
					.Dim = c(11L, 2L)
				), 
				edge.length = c(0.157, 0.1775, 0.07063, 0.31937, 0.04062, 0.333, 0.287, 0.0875, 0.313, 0.257, 0.153), 
				Nnode = 5L,
				tip.label = c("taxon_1", "taxon_2", "taxon_5", "taxon_6", "taxon_3", "taxon_7", "taxon_4")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		tree2 = structure(
			list(
    				edge = structure(
					c(8, 8, 9, 10, 10, 9, 11, 12, 12, 11, 8, 1, 9, 10, 2, 3, 11, 12, 4, 5, 6, 7), 
					.Dim = c(11L, 2L)
				), 
   				edge.length = c(0.139, 0.20375, 0.06875, 0.37, 0.3, 0.04688, 0.00812, 0.323, 0.347, 0.34188, 0.131), 
				Nnode = 5L, 
				tip.label = c("taxon_1", "taxon_2", "taxon_6", "taxon_3", "taxon_7", "taxon_5", "taxon_4" )
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"),
			class = "phylo"
		), 
		tree3 = structure(
			list(
				edge = structure(
					c(8, 8, 9, 10, 10, 9, 11, 12, 12, 11, 8, 1, 9, 10, 2, 3, 11, 12, 4, 5, 6, 7),
					.Dim = c(11L, 2L)
				), 
				edge.length = c(0.128, 0.20583, 0.02417, 0.351, 0.359, 0.02937, 0.08938, 0.29, 0.3, 0.32563, 0.122), 
				Nnode = 5L, 
				tip.label = c("taxon_1", "taxon_2", "taxon_5", "taxon_3", "taxon_7", "taxon_6", "taxon_4")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		tree4 = structure(
			list(
				edge = structure(
					c(8, 8, 9, 10, 11, 11, 10, 9, 12, 12, 8, 1, 9, 10, 11, 2, 3, 4, 12, 5, 6, 7), 
					.Dim = c(11L, 2L)
				), 
				edge.length = c(0.167, 0.17083, 0.03125, 0.00375, 0.349, 0.331, 0.37125, 0.07417, 0.353, 0.267, 0.153), 
				Nnode = 5L, 
				tip.label = c("taxon_1", "taxon_2", "taxon_6", "taxon_5", "taxon_3", "taxon_7", "taxon_4")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		tree5 = structure(
			list(
				edge = structure(
					c(8, 8, 9, 10, 11, 11, 10, 9, 12, 12, 8, 1, 9, 10, 11, 2, 3, 4, 12, 5, 6, 7), 
					.Dim = c(11L, 2L)
				), 
				edge.length = c(0.109, 0.23417, 0.0375, 0.01, 0.348, 0.282, 0.36, 0.04583, 0.364, 0.316, 0.111), 
				Nnode = 5L, 
				tip.label = c("taxon_1", "taxon_2", "taxon_6", "taxon_5", "taxon_3", "taxon_7", "taxon_4")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		)
	), 
	.Names = c("tree1", "tree2", "tree3", "tree4", "tree5"), 
	class = c("multi.tree", "phylo"), 
	origin = "/Users/bcomeara/Desktop/RHackTrees/altnexus_treewts.tre"
)

structure(
          list(tre = (taxon_1,((taxon_2,(taxon_5,taxon_6)I1)I2,(taxon_3,taxon_7)I3)I4,taxon_4)Root; ,
               leaves = structure(c(0.157, 0.31937, 0.333, 0.287, 0.313, 0.257, 0.153),
                 .Names = c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 , taxon_7 , taxon_4 )),
               nodes = structure(c(0.04062, 0.07063, 0.0875, 0.1775, 0),
                 .Names = c("I1", I2 , I3 , I4 , Root )),
               parts = structure(list(I1 = c("taxon_5", taxon_6 ),
                 I2 = c("taxon_2", I1 ), I3 = c("taxon_3", taxon_7 ), I4 = c("I2", I3 ),
                 Root = c("taxon_1", I4 , taxon_4 )),
                 .Names = c("I1", I2 , I3 , I4 , Root )),
               paths = structure(list( taxon_1 = c("Root", taxon_1 ),
                 taxon_2 = c("Root", I4 , I2 , taxon_2 ), taxon_5 = c("Root", I4 , I2 , I1 , taxon_5 ),
                 taxon_6 = c("Root", I4 , I2 , I1 , taxon_6 ), taxon_3 = c("Root", I4 , I3 , taxon_3 ),
                 taxon_7 = c("Root", I4 , I3 , taxon_7 ), taxon_4 = c("Root", taxon_4 ),
                 I1 = c("Root", I4 , I2 , I1 ), I2 = c("Root", I4 , I2 ), I3 = c("Root", I4 , I3 ),
                 I4 = c("Root", I4 ), Root = Root ),
                 .Names = c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 , taxon_7 ,
                   taxon_4 , I1 , I2 , I3 , I4 , Root )),
               droot = structure(c(0.157, 0.5675, 0.62175, 0.57575, 0.578, 0.522, 0.153, 0.28875,
                 0.24813, 0.265, 0.1775, 0), .Names = c("taxon_1", taxon_2 , taxon_5 , taxon_6 ,
                                               taxon_3 , taxon_7 , taxon_4 , I1 , I2 , I3 , I4 , Root )),
               call = newick2phylog(x.tre = (taxon_1:0.15700,((taxon_2:0.31937,
                 (taxon_5:0.33300,taxon_6:0.28700):0.04062):0.07063,
                 (taxon_3:0.31300,taxon_7:0.25700):0.08750):0.17750,taxon_4:0.15300); ),
               Wmat = structure(c(0.157, 0, 0, 0, 0, 0, 0, 0, 0.5675, 0.24813, 0.24813,
                 0.1775, 0.1775, 0, 0, 0.24813, 0.62175, 0.28875, 0.1775, 0.1775, 0, 0,
                 0.24813, 0.28875, 0.57575, 0.1775, 0.1775, 0, 0, 0.1775, 0.1775, 0.1775,
                 0.578, 0.265, 0, 0, 0.1775, 0.1775, 0.1775, 0.265, 0.522, 0, 0, 0, 0, 0, 0, 0, 0.153),
                 .Dim = c(7L, 7L), .Dimnames = list(c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 ,
                                     taxon_7 , taxon_4 ), c("1", 2 , 3 , 4 , 5 , 6 , 7 ))),
               Wdist = structure(c(0.851175657546666, 0.88246812973614, 0.856008177531033,
                 0.857321409974112, 0.824014562978107, 0.556776436283002, 0.832460209259277,
                 0.804356885965428, 0.88910066921581, 0.857029754442633, 0.84882271411644,
                 0.787400787401181, 0.919102823409873, 0.888115983416581, 0.880198841171698,
                 0.893728146585974, 0.861829449485222, 0.853668553948194, 0.754983443527075,
                 0.854985379991962, 0.82158383625775), Labels = c("taxon_1", taxon_2 , taxon_5 ,
                                                         taxon_6 , taxon_3 , taxon_7 , taxon_4 ),
                 Size = 7L, call = as.dist.default(m = sqrt(w)), class = dist , Diag = FALSE,
                 Upper = FALSE), Wvalues = c(0.517654416795233, 0.45691438884533, 0.324953044065005,
                                   0.288550500513525, 0.266755336744264, 0.146514645670451),
               Wscores = structure(list(
                 W1 = c(1.15680322982928, -0.839238169989273, -1.36295711977198, -1.12237919277766,
                   0.565868786682654, 0.456825398689119, 1.14507706733786),
                 W2 = c(1.08176007893331, 0.171916148496355, 0.358538730234234, 0.274542502355368,
                   -1.68630839180502, -1.2691108536628, 1.06866178544856),
                 W3 = c(-0.110718502615242, 2.19596385390424, -1.42557561091816, -0.270141239188328,
                   -0.207553425167584, -0.0735782656838285, -0.108396810331097 ),
                 W4 = c(0.0189599215123827, 0.656488282514355, 1.40764433338947, -2.14116220473829,
                   0.0471925375786402, -0.00758465277104134, 0.0184617825144888),
                 W5 = c(-0.0840601103806267, -0.113488418683814, -0.00810667391418106, -0.0856309018062446,
                   -1.67058161723265, 2.04332514673606, -0.0814574247185417),
                 W6 = c(1.86330814721571, 0.00322459474616387, 0.00193872504098507, 0.00261430031253841,
                   0.00283271048785615, 0.00438780186295135, -1.87830627966620 )),
                 .Names = c("W1", W2 , W3 , W4 , W5 , W6 ),
                 row.names = c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 , taxon_7 , taxon_4 ),
                 class = data.frame ),
               Amat = structure(c(0.333333333333333, 0.0833333333333333, 0.0416666666666667,
                 0.0416666666666667, 0.0833333333333333, 0.0833333333333333, 0.333333333333333,
                 0.0833333333333333, 0.0833333333333333, 0.25, 0.25, 0.125, 0.125, 0.0833333333333333,
                 0.0416666666666667, 0.25, 0.0416666666666667, 0.5, 0.0625, 0.0625, 0.0416666666666667,
                 0.0416666666666667, 0.25, 0.5, 0.0416666666666667, 0.0625, 0.0625, 0.0416666666666667,
                 0.0833333333333333, 0.125, 0.0625, 0.0625, 0.0833333333333333, 0.5, 0.0833333333333333,
                 0.0833333333333333, 0.125, 0.0625, 0.0625, 0.5, 0.0833333333333333, 0.0833333333333333,
                 0.333333333333333, 0.0833333333333333, 0.0416666666666667, 0.0416666666666667, 0.0833333333333333,
                 0.0833333333333333, 0.333333333333333 ), .Dim = c(7L, 7L),
                 .Dimnames = list(c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 , taxon_7 , taxon_4 ),
                   c("1", 2 , 3 , 4 , 5 , 6 , 7 ))),
               Avalues = c(4.00011881838064, 3.00119419654504, 0, -0.876313014925674, -2.91666666666666,
                 -3.20833333333333), Adim = 2L,
               Ascores = structure(list(
                 A1 = c(1.37068216425543, -0.665475112597043, -1.17514961890774, -1.17514961890774,
                   0.137205010950835, 0.137205010950835, 1.37068216425543),
                 A2 = c(-0.780553394336068, -0.216441236131083, -0.667447822287951, -0.66744782228795,
                   1.55622183468956, 1.55622183468956, -0.78055339433607),
                 A3 = c(1.87082869338697, -1.83585876436006e-15, -1.46868701148805e-16, 6.60909155169623e-16,
                   -3.67171752872013e-16, -8.81212206892831e-16, -1.87082869338697),
                 A4 = c(-0.109392884514923, 2.34740198215304, -0.82069286441644, -0.82069286441644,
                   -0.243615242145153, -0.243615242145152, -0.109392884514925 ),
                 A5 = c(2.99138573270853e-17, 1.04117716179634e-15, -7.13630799152549e-15, 9.07813726155285e-15,
                   1.87082869338697, -1.87082869338697, 1.71233202175417e-15),
                 A6 = c(-7.96698681088859e-17, 1.17703896495507e-15, -1.87082869338697, 1.87082869338697,
                   -8.18910901847661e-15, 9.1413977170824e-15, 1.17872218336876e-15 )),
                 .Names = c("A1", A2 , A3 , A4 , A5 , A6 ),
                 row.names = c("taxon_1", taxon_2 , taxon_5 ,taxon_6 , taxon_3 , taxon_7 , taxon_4 ),
                 class = data.frame ),
               Aparam = structure(list(ndir = c(2L, 2L, 2L, 2L, 3L), nlea = c(2L, 3L, 2L, 5L, 7L),
                 lnperm = structure(c(0.693147180559945, 1.38629436111989, 0.693147180559945, 2.77258872223978,
                   4.56434819146784 ),
                   .Names = c("I1", I2 , I3 , I4 , Root ), class = AsIs )),
                 .Names = c("ndir", nlea , lnperm ),
                 row.names = c("I1", I2 , I3 , I4 , Root ), class = data.frame ),
               Bindica = structure(list( I4 = c(0, 1, 1, 1, 1, 1, 0), I2 = c(0, 1, 1, 1, 0, 0, 0),
                 I1 = c(0, 0, 1, 1, 0, 0, 0), taxon_4 = c(0, 0, 0, 0, 0, 0, 1), taxon_7 = c(0, 0, 0, 0, 0, 1, 0),
                 taxon_6 = c(0, 0, 0, 1, 0, 0, 0)), .Names = c("I4", I2 , I1 , taxon_4 , taxon_7 , taxon_6 ),
                 row.names = c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 , taxon_7 , taxon_4 ),
                 class = data.frame ),
               Bscores = structure(list(
                 B1 = c(1.58113883008419, -0.632455532033676, -0.632455532033676, -0.632455532033676,
                   -0.632455532033676, -0.632455532033676, 1.58113883008419),
                 B2 = c(-6.36019743019184e-17, -0.966091783079295, -0.966091783079296, -0.966091783079296,
                   1.44913767461894, 1.44913767461894, -2.37748557155488e-16 ),
                 B3 = c(-3.11660601640755e-16, 2.16024689946929, -1.08012344973464, -1.08012344973464,
                   -2.32354675108380e-16, -2.32354675108380e-16, 6.13827271892299e-17),
                 B4 = c(1.87082869338697, 2.93737402297610e-16, -7.34343505744026e-17, -2.93737402297610e-16,
                   -2.20303051723208e-16, -7.34343505744026e-17, -1.87082869338697),
                 B5 = c(-1.60941647422338e-16, -2.54969896818983e-17, 1.04676808590360e-16, -1.56029222463577e-16,
                   1.87082869338697, -1.87082869338697, -6.91147182129409e-18 ),
                 B6 = c(9.13555395188473e-17, -3.32375327590004e-16, -1.87082869338697, 1.87082869338697,
                   -7.76055830278556e-17, -7.76055830278556e-17, -1.13186229312142e-17)),
                 .Names = c("B1", B2 , B3 , B4 , B5 , B6 ),
                 row.names = c("taxon_1", taxon_2 , taxon_5 , taxon_6 , taxon_3 , taxon_7 , taxon_4 ),
                 class = data.frame ), Blabels = structure(c("6", 3 , 5 , 2 , 1/4 ),
                                         .Names = c("I1", I2 , I3 , I4 , Root ))),
          .Names = c("tre", leaves , nodes , parts , paths , droot , call , Wmat , Wdist , Wvalues , Wscores ,
            Amat , Avalues , Adim , Ascores , Aparam , Bindica , Bscores , Blabels ), class = phylog )

?
?
?
?
?
?
?
?
nexus_rooted_brlen.tre
structure(
	list(
		edge = structure(
			c(8, 9, 10, 10, 9, 11, 11, 8, 12, 12, 13, 13, 9, 10, 1, 2, 11, 3, 4, 12, 5, 13, 6, 7), 
			.Dim = c(12L, 2L)
		), 
		edge.length = c(12, 14, 28, 46, 26, 33, 32, 8, 27, 26, 41, 34), 
		Nnode = 6L, 
		tip.label = c("taxon_1", "taxon_3", "taxon_2", "taxon_6", "taxon_4", "taxon_5", "taxon_7"), 
		root.edge = 0
	), 
	.Names = c("edge", "edge.length", "Nnode", "tip.label", "root.edge"), 
	class = "phylo", 
	origin = "/Users/bcomeara/Desktop/RHackTrees/nexus_rooted_brlen.tre"
)
?
?
?
?
?
?
?
?
?
nexus_simple.tre
structure(
	list(
		edge = structure(
			c(8, 9, 10, 10, 9, 11, 11, 8, 12, 12, 13, 13, 9, 10, 1, 2, 11, 3, 4, 12, 5, 13, 6, 7), 
			.Dim = c(12L, 2L)
		), 
		tip.label = c("taxon_1", "taxon_3", "taxon_2", "taxon_6", "taxon_4", "taxon_5", "taxon_7"), 
		Nnode = 6L
	), 
	.Names = c("edge", "tip.label", "Nnode"), 
	class = "phylo", 
	origin = "/Users/bcomeara/Desktop/RHackTrees/nexus_simple.tre"
)
?
?
?
?
?
?
?
?
?
notes_multitrees.nex

FAILURE

?
?
?
?
?
?
?
?
?
phylip.tre
structure(
	list(
		tree1 = structure(
			list(
				edge = structure(
					c(8, 9, 10, 10, 9, 11, 11, 8, 12, 12, 13, 13, 9, 10, 1, 2, 11, 3, 4, 12, 5, 13, 6, 7), 
					.Dim = c(12L, 2L)
				), 
				edge.length = c(3.63659246127713, 5.75644760333622, 0.606959935386656, 0.606959935386656, 0.850173315120816, 5.51323422360206, 5.51323422360206, 5.89200083829354, 4.10799916170646, 3.76052686209822, 0.347472299608242, 0.347472299608242), 
				Nnode = 6L, 
				tip.label = c("taxon_6", "taxon_2", "taxon_3", "taxon_1", "taxon_4", "taxon_7", "taxon_5")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		tree2 = structure(
			list(
				edge = structure(
					c(8, 8, 9, 10, 11, 12, 12, 11, 10, 9, 13, 13, 1, 9, 10, 11, 12, 2, 3, 4, 5, 13, 6, 7), 
					.Dim = c(12L, 2L)
				), 
				edge.length = c(10, 1.22766471256685, 2.02571277023826, 2.23491368116935, 2.14940475897520, 2.36230407705033, 2.36230407705033, 4.51170883602554, 6.74662251719489, 8.17630238667944, 0.596032900753702, 0.596032900753702), 
				Nnode = 6L, 
				tip.label = c("taxon_2", "taxon_5", "taxon_7", "taxon_3", "taxon_1", "taxon_4", "taxon_6")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		),
		tree3 = structure(
			list(
				edge = structure(
					c(8, 9, 10, 10, 11, 11, 9, 12, 12, 8, 13, 13, 9, 10, 1, 11, 2, 3, 12, 4, 5, 13, 6, 7), 
					.Dim = c(12L, 2L)
				), 
				edge.length = c(3.65768435814907, 2.51101256019392, 3.83130308165701, 2.46098556027136, 1.37031752138566, 1.37031752138566, 6.0950862882223, 0.247229353628625, 0.247229353628625, 8.01673281717233, 1.98326718282767, 1.98326718282767), 
				Nnode = 6L, 
				tip.label = c("taxon_2", "taxon_7", "taxon_3", "taxon_1", "taxon_4", "taxon_6", "taxon_5")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		)
	), 
	.Names = c("tree1", "tree2", "tree3"), 
	class = c("multi.tree", "phylo")
)
?
?
?
?
?
?
?
?
?
samplefile.nex

PARTIAL FAILURE: Data not loaded, tree is loaded (below)

structure(
	list(
		tree1 = structure(
			list(
				edge = structure(
					c(8, 9, 10, 10, 9, 11, 11, 8, 12, 12, 13, 13, 9, 10, 1, 2, 11, 3, 4, 12, 5, 13, 6, 7), 
					.Dim = c(12L, 2L)
				), 
				edge.length = c(3.63659246127713, 5.75644760333622, 0.606959935386656, 0.606959935386656, 0.850173315120816, 5.51323422360206, 5.51323422360206, 5.89200083829354, 4.10799916170646, 3.76052686209822, 0.347472299608242, 0.347472299608242), 
				Nnode = 6L, 
				tip.label = c("taxon_6", "taxon_2", "taxon_3", "taxon_1", "taxon_4", "taxon_7", "taxon_5")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		tree2 = structure(
			list(
				edge = structure(
					c(8, 8, 9, 10, 11, 12, 12, 11, 10, 9, 13, 13, 1, 9, 10, 11, 12, 2, 3, 4, 5, 13, 6, 7), 
					.Dim = c(12L, 2L)
				), 
				edge.length = c(10, 1.22766471256685, 2.02571277023826, 2.23491368116935, 2.14940475897520, 2.36230407705033, 2.36230407705033, 4.51170883602554, 6.74662251719489, 8.17630238667944, 0.596032900753702, 0.596032900753702), 
				Nnode = 6L, 
				tip.label = c("taxon_2", "taxon_5", "taxon_7", "taxon_3", "taxon_1", "taxon_4", "taxon_6")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		tree3 = structure(
			list(
				edge = structure(
					c(8, 9, 10, 10, 11, 11, 9, 12, 12, 8, 13, 13, 9, 10, 1, 11, 2, 3, 12, 4, 5, 13, 6, 7), 
					.Dim = c(12L, 2L)
				), 
				edge.length = c(3.65768435814907, 2.51101256019392, 3.83130308165701, 2.46098556027136, 1.37031752138566, 1.37031752138566, 6.0950862882223, 0.247229353628625, 0.247229353628625, 8.01673281717233, 1.98326718282767, 1.98326718282767), 
				Nnode = 6L, 
				tip.label = c("taxon_2", "taxon_7", "taxon_3", "taxon_1", "taxon_4", "taxon_6", "taxon_5")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		)
	), 
	.Names = c("tree1", "tree2", "tree3"), 
	class = c("multi.tree", "phylo"), 
	origin = "/Users/bcomeara/Desktop/RHackTrees/samplefile.nex"
)
?
?
?
?
?
?
?
?
?

Other info

Ade4

The S3 class phylog is a list containing the following items.

  • Items strictly representing the tree:
    • $tre: the tree in newick format
    • $leaves: a vector giving the distance to the closest HTU for each tip
    • $nodes: a vector giving the distance to the preceding HTU for each node
    • $parts: a list giving the direct descendants for each HTU
    • $paths: a list giving the path (i.e. set of HTU) to the root for each OTU and HTU.
    • $droot: a vector of distances to the root for all TU
    • $call: the matched call of the object
  • Optional items, but provided by default, and possibly requiring a lot of memory for large phylogenies:
    • $Wmat: matrix of expected covariances among OTU under a Brownian motion model
    • $Wdist: matrix of square roots of distances between OTU (sums of branches lengths)
    • $Wvalues and $Wscores: eigen analysis of $Wdist
    • $Amat: matrix underlying Abouheif's test (seen as a Moran's I)
    • $Avalues and $Ascores: eigenanalysis of $Amat
    • $Adim: number of positive eigenvalues of $Amat
    • $Aparam: auxiliary infos about HTU (for internal use)
    • $Bindica: dummy variables associated to the topology
    • $Bscores: the orthonormalisation of $Bindica using QR decomposition
    • $Blabels: for each node, the name of the dummy vector associated to it

Notes:

  • This class is consistent with rooted trees, as several items only make sense in this case ($nodes, $droot, $paths, $Amat, ...).
  • $Bvalues is documented but no longer exists
  • in S4 paradigm (and, in fact, as well for S3), the optional items should be methods associated to the class, not components of the class itself
  • Conversion from newick format to phylog (newick2phylog) is only implemented for a character string. In other words, a file .tre cannot be read directly, and there is no parser to seek a tree from a NEXUS file.

--Jombart 05:23, 29 November 2007 (EST)

Ape

There are two main data classes in ape: "phylo" and "DNA.bin". They are both described in ape Web pages (->Development section). Some features of "phylo" are summarized in the R_Hackathon_1/Data Standards page. Both classes have associated functions to read/write files on the disk, manipulate them and compute with in R, and ways to pass them to C.

Two other classes are worth mentioning:

  • "prop.part" is a list of bipartitions stored either as lists of taxon names, or as lists of tip #'s plus an additional attribute giving the names of the taxa;
  • "multi.tree" is a list of trees (currently exists only as c("multi.tree", "phylo") but this needs to be changed because R's methods applying to "phylo" cannot be applied to "multi.tree").

There are print and plot methods for these two classes.

See above for internal representations of trees. Below is the carnivora dataframe. Note the use of factors for discrete data and numeric vectors for continuous data


structure(
	list(
		Order = structure(
			c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), 
			.Label = "Carnivora", 
			class = "factor"
		), 
		SuperFamily = structure(
			c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), 
			.Label = c("Caniformia", "Feliformia"), 
			class = "factor"
		), 
		Family = structure(
			c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 7L, 7L, 7L, 7L, 6L, 6L, 6L, 6L, 1L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 4L, 4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L), 
			.Label = c("Ailuridae", "Canidae", "Felidae", "Hyaenidae", "Mustelidae", "Procyonidae", "Ursidae", "Viverridae"), 
			class = "factor"
		), 
		Genus = structure(
			c(9L, 9L, 9L, 9L, 38L, 16L, 5L, 72L, 72L, 72L, 22L, 48L, 67L, 18L, 18L, 11L, 12L, 61L, 68L, 68L, 66L, 60L, 8L, 54L, 47L, 57L, 4L, 45L, 45L, 45L, 45L, 45L, 45L, 45L, 45L, 45L, 71L, 40L, 40L, 40L, 40L, 27L, 64L, 26L, 33L, 53L, 42L, 41L, 65L, 43L, 62L, 36L, 36L, 36L, 37L, 6L, 19L, 69L, 13L, 70L, 25L, 25L, 56L, 46L, 3L, 52L, 52L, 49L, 2L, 29L, 23L, 20L, 24L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 30L, 44L, 15L, 28L, 32L, 7L, 17L, 51L, 63L, 31L, 31L, 14L, 58L, 21L, 21L, 21L, 35L, 55L, 55L, 55L, 10L, 59L, 34L, 34L, 39L, 39L, 50L, 50L, 50L, 50L, 50L, 1L), 
			.Label = c("Acinonyx", "Acrctictis", "Actogalidia", "Ailuropoda", "Alopex", "Aonyx", "Atilax", "Bassariscus", "Canis", "Caracal", "Cerdocyon", "Chrysocyon", "Civettictis", "Crocuta", "Crossarchus", "Cuon", "Cynictus", "Dusicyon", "Enhydra", "Eupleres", "Felis", "Fennecus", "Fossa", "Galidea", "Genetta", "Grison", "Gulo", "Helogale", "Hemigalus", "Herpetes", "Hyaena", "Ichneumia", "Ictonyx", "Leopardus", "Leptailurus", "Lutra", "Lutrogale", "Lycaon", "Lynx", "Martes", "Meles", "Mellivora", "Mephistis", "Mungos", "Mustela", "Nandinia", "Nasua", "Otocyon", "Paguma", "Panthera", "Paracynictis", "Paradoxurus", "Poecilogale", "Polos", "Prionailurus", "Prionodon", "Procyon", "Proteles", "Puma", "Selenarctos", "Speothos", "Spilogale", "Suricata", "Tavra", "Taxidea", "Thalarctos", "Urocyon", "Ursus", "Viverra", "Viverricula", "Vormela", "Vulpes"), 
			class = "factor"
		), 
		Species = structure(
			c(11L, 10L, 9L, 12L, 56L, 19L, 3L, 112L, 110L, 111L, 28L, 78L, 104L, 21L, 22L, 14L, 15L, 98L, 106L, 105L, 103L, 97L, 8L, 89L, 77L, 94L, 2L, 68L, 70L, 72L, 75L, 67L, 73L, 69L, 74L, 71L, 109L, 60L, 59L, 61L, 62L, 34L, 101L, 33L, 48L, 88L, 64L, 63L, 102L, 65L, 99L, 53L, 52L, 54L, 55L, 4L, 23L, 107L, 16L, 108L, 31L, 32L, 93L, 76L, 6L, 86L, 87L, 79L, 5L, 36L, 29L, 24L, 30L, 39L, 40L, 37L, 38L, 41L, 44L, 43L, 42L, 66L, 18L, 35L, 47L, 7L, 20L, 85L, 100L, 46L, 45L, 17L, 95L, 27L, 25L, 26L, 51L, 90L, 91L, 92L, 13L, 96L, 50L, 49L, 57L, 58L, 80L, 83L, 82L, 81L, 84L, 1L), 
			.Label = c("Acinonyx jubatus", "Ailuropoda melanoleuca", "Alopex lagopus", "Aonyx capensis", "Arctictis binturong", "Arctogalidia trivirgata", "Atilax paludinosus", "Bassariscus astutus", "Canis adustus", "Canis latrans", "Canis lupus", "Canis mesomelas", "Caracal caracal", "Cerdocyon thous", "Chrysocyon brachyurus", "Civettictis iietta", "Crocuta crocuta", "Crossarchus obscurus", "Cuon alpinus", "Cynictus penicillata", "Dusicyon culpaeus", "Dusicyon gylnnocercus", "Enhvdra lutris", "Eupleres goudoti", "Felis Iibyca", "Felis chaus", "Felis silvestris", "Fennecus zerda", "Fossa fossa", "Galidea elegans", "Genetta genetta", "Genetta tigrina", "Grison vittatus", "Gulo gulo", "Helogale parvula", "Hemigalus derbyanus", "Herpestes auropunctatus", "Herpestes edwardsi", "Herpestes ichneumon", "Herpestes sanguineus", "Herpestes smithi", "Herpestes urva", "Herpestes vitticollis", "Herpestesfuscus", "Hyaena brunnea", "Hyaena hyaena", "Ichneumia albicauda", "Ictonyx striatus", "Leopardus geoffroyi", "Leopardus pardalis", "Leptailurus serval", "Lutra cauadensis", "Lutra lutra", "Lutra maculicollis", "Lutrogale perspicillata", "Lycaon pictus", "Lynx lynx", "Lynx rufus", "Martes amerkana", "Martes martes", "Martes pennanti", "Martes zibellina", "Meles meles", "Mellivora capensis", "Mephitis mephitis", "Mungos mungo", "Mustela altaica", "Mustela erminea", "Mustela lutreola", "Mustela nivalis", "Mustela putorius", "Mustela rixosa", "Mustela sibirica", "Mustela vison", "Mustelafrenata", "Nandinia hinotata", "Nasua narica", "Otocyon megalotis", "Paguma Iarvata", "Panthera leo", "Panthera onca", "Panthera pardus", "Panthera tigris", "Panthera uncia", "Paracynictis selousi", "Paradoxurus hermaphroditus", "Paradoxurus zeylonensis", "Poecilogale albinucha", "Polos flavus", "Prionailurus bengalensis", "Prionailurus rubiginosa", "Prionailurus viverrinus", "Prionodon linsang", "Procyon lotor", "Proteles cristatus", "Puma concolor", "Selenarctos thibetanus", "Speothos venalicus", "Spilogale putorius", "Suricata suricatta", "Tavra barbara", "Taxidea taxus", "Thalarctos maritimus", "Urocyon cinereoargenteus", "Ursus americanus", "Ursus arctos", "Viverra zihetha", "Viverricula indica", "Vormela peregusna", "Vulpes bengalensis", "Vulpes chama", "Vulpes vulpes"), 
			class = "factor"
		), 
		FW = c(31.1, 9.7, 10.6, 7.2, 22.2, 13.8, 2.9, 3.9, 1.8, 3.1, 1.5, 3.9, 3.3, 6.7, 4.2, 6, 23, 8, 298.5, 97, 320, 77.5, 0.87, 2, 5, 6.7, 120, 0.62, 0.06, 0.05, 0.23, 0.13, 0.4, 0.44, 0.61, 0.8, 0.53, 1.2, 0.77, 2.25, 1.03, 10.35, 4.4, 1.8, 0.63, 0.25, 7.59, 10.9, 4.1, 2, 0.43, 7.1, 7.8, 3.5, 7.3, 18, 24.4, 9, 12.24, 2.49, 1.8, 2.02, 0.72, 3.2, 2.4, 2.7, 2.3, 5, 13, 0.86, 1.6, 2.1, 0.81, 2.9, 0.44, 0.53, 1.04, 1.25, 0.79, 1.7, 2.04, 1.23, 1.31, 0.27, 3.53, 3.3, 0.6, 1.64, 0.72, 26.6, 43.9, 55.3, 8.36, 4.33, 3.85, 6.65, 10.4, 3.3, 1.25, 6.3, 9.68, 39.6, 10.75, 2.2, 17.8, 5.2, 135.5, 131, 39.3, 77.6, 32.5, 60), 
		SW = c(33.1, 10.6, 11.3, 7.7, 22, 15.8, 3.2, 4.1, 2.4, 3.1, 1.5, 3.9, 3.7, 7.4, 4.4, 6, 23, 8, 298.5, 110.5, 365, 103.8, 0.95, 2.1, 5, 6.4, 135, 0.95, 0.08, 0.05, 2.33, 0.19, 0.57, 0.59, 0.91, 1.03, 0.6, 1.2, 0.87, 3.75, 1.18, 11.6, 4.4, 2.6, 0.77, 0.3, 8.08, 11.6, 4.05, 2.4, 0.55, 8.9, 8.2, 4.04, 8.78, 19, 28.3, 9.3, 12.02, 2.66, 1.9, 2.06, 0.67, 3.2, 2.4, 3, 2.8, 4.7, 13, 0.83, 1.8, 2.1, 0.81, 3.05, 0.49, 0.78, 1.28, 1.7, 1.19, 2.38, 2.38, 1.26, 1.31, 0.27, 3.89, 3.7, 0.6, 1.7, 0.73, 26.8, 43.3, 52, 8.34, 4.67, 4.3, 6.65, 11.7, 5.5, 1.43, 8.8, 11.59, 51.8, 11.88, 2.2, 19.3, 6.2, 155.8, 161, 52.4, 86.2, 32.5, 58.8 ), 
		FB = c(130, 84.5, 53.5, 52, 128, 95, 37, 43, 24.5, 33, 17.5, 24.5, 39.5, 51, 40, 40.5, 116, 41.5, 339, 228, 365, 298, 16, 24, 37, 39, 205, 3, 2, 1, 4, 4.5, 6, 8, 7, 7, 4, 18, 14.5, 29, 17, 72.5, 35, 23.5, 8.5, 4.5, 64, 45.5, 48.5, 10, 5, 39, 50.5, 33, 61, 93, 119, 36.5, 39, 17, 14, 15.5, 8, 17, 21, 18.5, 17.5, 29.5, 38, 16, 18, 17, 10, 23, 9, 7, 10, 13.5, 11, 26, 20, 10, 9.5, 5, 22.5, 27, 10, 15.5, 10, 98, 110, 153, 36.5, 35.5, 33.5, 37, 57, 28.5, 19, 45.5, 53.5, 119, 60, 35.5, 68.5, 58.5, 219, 247, 112, 149, 98, 106), 
		SB = c(132.3, 88.3, 51.8, 56.8, 129, 95, 35.5, 43.5, 25.8, 33.5, 17.3, 26.8, 40.8, 51.5, 40, 41.8, 120, 40.5, 338.3, 259, 459.5, 312.5, 16.5, 25.5, 37, 40, 234.3, 4, 2, 1, 4, 4.5, 6.75, 8.5, 8.5, 8.3, 4.8, 20, 15.8, 31.8, 18.5, 78.5, 35.8, 24.3, 9.8, 4.8, 72.8, 50.5, 49, 10.3, 5, 42, 52.8, 40, 65, 95, 125.5, 37, 37, 16.8, 14, 15.3, 8.5, 17.3, 22, 18.5, 17.8, 30.8, 40.8, 19, 19.8, 17, 10.8, 23.3, 8.75, 7.25, 10.5, 13.8, 12.5, 25.8, 21, 10.5, 9.8, 4.75, 24.3, 28.5, 10.5, 15.8, 10.3, 97.8, 107, 143.5, 35.3, 37.5, 36.3, 39.3, 56.8, 29.3, 19, 46.5, 55.3, 125.5, 63.8, 34, 70, 58.3, 223.5, 279.3, 125.5, 151.5, 102, 111), 
		LS = c(5.5, 6.2, 4.3, 3.8, 8.8, 4.3, 7.1, 4.8, 3.5, 4, 2.8, 3.5, 3.8, 5, 4, 3.1, 1.8, 3.5, 2, 2.5, 1.9, 2, 3, 1.5, 4, 3.8, 1.5, 4.5, 5.8, 4.8, 6, 4, 5, 4.5, 5, 6, 6, 3.3, 2.6, 2.7, 3, 2.8, 3.5, 2, 2.3, 2, 2.5, 3, 4, 6, 4.3, 2.5, 3, 3, 1.5, 3, 1, 2.8, 3, 3.8, 3.5, 2.5, NA, 1.8, 2.8, 3.3, 2.5, 3, 3, NA, 1, 1.5, 1, 2.5, 2.5, 3.2, 3, 2.5, 3.5, 3, 3, 3.8, 4, 3.6, 2.5, 2.5, 2.5, 1.5, 4, 2.5, 2.3, 2, 2.8, 3.3, 2.8, 2.9, 2.4, 2.5, 2.5, 2.5, 3, 2.5, 2.5, 2, 2.3, 3.2, 2.6, 2.5, 2.6, 2.5, 2.8, 3.8), 
		GL = c(63, 61.5, 63.3, 60, 70.5, 62, 53.3, 54.5, 52, NA, 54.3, 62.5, 63, 57.5, 58, 56, 63.3, 65, 63, 91, NA, NA, 52, 106.5, 73.5, 64.7, NA, 70, 42, 37, 23.5, 40, 29, 38.5, 29, 41, 61.5, 30, 26.5, 77, 28, 35, 64, NA, 36, 32, 168, 42, 42, 63, 30, 66.5, 112, 56, 62, 63, 120, 77, 68.5, NA, 71.8, 70, NA, 64, 45, NA, NA, NA, 90.3, NA, 85, NA, 83, 63, NA, 46, 60.5, NA, NA, NA, 63, 59, 70, 51, NA, NA, 54.5, NA, 77, 87, NA, 110, 100, 67, 57, 65, 71, 67.3, NA, 92.5, 73.5, 90, 72.5, 69.5, 67.8, 63, 105.5, 104.1, 98, 104.5, 96.8, 91), 
		BW = c(425, 225, NA, NA, 365, 275, 66, 105, NA, NA, 34.8, NA, 107.5, 168, NA, 140, 360, NA, 1000, 285, 641.6, NA, 28, 170.5, 140, 105.9, 104.8, 1.7, 3, 0.01, 3.1, NA, NA, NA, NA, NA, NA, NA, 28, 28, 32.5, 99.2, NA, NA, 15, 4, NA, 103.5, NA, 33, 15.9, 285, NA, NA, NA, NA, 210, NA, NA, NA, NA, NA, 40, 56, NA, 95.5, NA, NA, 319, 125, 82.5, 150, 47.5, NA, NA, NA, NA, NA, NA, NA, NA, 20, NA, NA, NA, NA, NA, NA, 30.5, NA, 693, 1500, NA, 137, NA, 135.5, 143.5, 83, NA, 92.5, NA, 400, 250, 65, 70, 311.5, 1650, 1255, 549.3, 816.6, 442.6, 287.5), 
		WA = c(35L, 98L, NA, 61L, 77L, NA, 21L, 56L, NA, NA, 66L, 105L, NA, NA, NA, 90L, NA, NA, 730L, 168L, NA, 119L, 120L, NA, NA, 119L, 180L, NA, 32L, 24L, 30L, 56L, 56L, 70L, NA, NA, NA, NA, 46L, 46L, 49L, 70L, NA, NA, 56L, 77L, NA, 95L, 42L, 46L, 56L, 112L, 93L, NA, 126L, NA, 364L, NA, 140L, NA, 175L, 56L, NA, NA, NA, NA, NA, NA, 56L, 70L, 52L, 63L, 56L, NA, NA, 32L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 42L, NA, 56L, 60L, 360L, 390L, NA, 84L, NA, 102L, NA, 25L, NA, 53L, 123L, NA, 49L, 63L, 113L, 60L, 150L, 165L, 139L, 115L, NA, 109L), 
		AI = c(NA, NA, NA, 270L, 390L, NA, 165L, 225L, NA, NA, NA, NA, NA, NA, NA, 195L, NA, NA, 648L, 483L, 821L, 913L, NA, NA, NA, NA, 180L, NA, NA, NA, 84L, 56L, NA, NA, NA, 70L, NA, NA, NA, NA, NA, 639L, NA, NA, NA, NA, NA, 210L, NA, 84L, NA, 238L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 365L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 900L, 913L, NA, 140L, 140L, NA, NA, NA, NA, NA, 365L, 420L, NA, NA, 240L, 365L, 1080L, 570L, 600L, NA, NA, 465L ), 
		LY = c(177L, NA, 127L, NA, 132L, 186L, 108L, 144L, NA, NA, 141L, NA, NA, NA, NA, NA, 162L, NA, 304L, 270L, 408L, 396L, 96L, 228L, NA, 120L, 216L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 150L, NA, NA, 186L, 144L, NA, NA, NA, 288L, 180L, 156L, 120L, NA, NA, NA, NA, 180L, NA, NA, NA, NA, 102L, NA, 180L, 102L, NA, 132L, 168L, NA, 180L, 216L, NA, NA, NA, NA, 156L, NA, 120L, NA, NA, NA, NA, 120L, 108L, NA, NA, NA, NA, NA, NA, NA, 282L, 150L, 276L, 144L, NA, 180L, 144L, 180L, 150L, NA, NA, 204L, NA, NA, NA, 162L, 156L, 216L, 207L, 264L, NA, NA, NA), 
		AM = structure(
			c(40L, 22L, 1L, 23L, 41L, 1L, 15L, 1L, 1L, 1L, 1L, 1L, 22L, 22L, 1L, 22L, 1L, 1L, 6L, 10L, 9L, 4L, 16L, 1L, 1L, 29L, 11L, 21L, 1L, 1L, 12L, 1L, 1L, 22L, 25L, 1L, 1L, 1L, 22L, 37L, 31L, 32L, 1L, 1L, 1L, 1L, 1L, 28L, 24L, 17L, 1L, 40L, 37L, 37L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 36L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 37L, 1L, 22L, 22L, 13L, 1L, 1L, 1L, 1L, 19L, 1L, 26L, 1L, 1L, 1L, 1L, 1L, 39L, 1L, 40L, 1L, 18L, 14L, 20L, 1L, 38L, 1L, 1L, 26L, 40L, 34L, 27L, 35L, 30L, 7L, 8L, 5L, 3L, 37L, 33L), 
			.Label = c("", "1095", "1110", "1186", "1187", "1338", "1620", "1643", "1734", "1834", "2312", "252", "270", "280", "293", "300", "308", "313", "323", "330", "336", "365", "392", "395", "420", "450", "480", "525", "540", "593", "600", "630", "645", "653", "690", "720", "730", "750", "821", "913", "t 132"), 
			class = "factor"
		), 
		IB = structure(
			c(3L, 3L, 1L, 1L, 4L, 1L, 3L, 3L, 1L, 1L, 3L, 1L, 3L, 3L, 3L, 15L, 1L, 1L, 11L, 10L, 8L, 1L, 1L, 1L, 3L, 3L, 3L, 3L, 14L, 14L, 3L, 1L, 1L, 1L, 3L, 3L, 1L, 1L, 3L, 1L, 1L, 10L, 1L, 1L, 1L, 1L, 14L, 3L, 1L, 3L, 15L, 1L, 1L, 1L, 1L, 1L, 3L, 1L, 16L, 1L, 14L, 1L, 1L, 14L, 14L, 14L, 1L, 1L, 1L, 1L, 3L, 1L, 3L, 1L, 14L, 14L, 2L, 1L, 1L, 1L, 1L, 1L, 13L, 13L, 1L, 14L, 3L, 1L, 1L, 1L, 1L, 5L, 1L, 14L, 1L, 14L, 14L, 3L, 1L, 1L, 3L, 7L, 1L, 3L, 3L, 3L, 9L, 12L, 8L, 1L, 1L, 6L), 
			.Label = c("", " S", "12", "13", "17", "18", "19", "24", "25", "27", "30", "32", "4", "6", "8", "9"), 
			class = "factor"
		)
	), 
	.Names = c("Order", "SuperFamily", "Family", "Genus", "Species", "FW", "SW", "FB", "SB", "LS", "GL", "BW", "WA", "AI", "LY", "AM", "IB"), 
	class = "data.frame", 
	row.names = c(NA, -112L)
)

apTreeshape

A tree of class "treeshape" is a fully dichotomous binary tree. The purpose of the class "treeshape" is to study the topology of phylogenetic trees. The heights of branches are not provided for a tree of that class because we mainly focus on the balance aspect of the trees. The ’i’th row of the nodes matrix represents the children of the node number i in the tree (nodes[i,1] being the left child, and nodes[i,2] being the right child). A positive value represents an internal node, while a negative one stands for a tip of the tree. The last row always represents the children of the root of the tree.

Here is the hivtree.treeshape data, which is a tree converted to treeshape format.

structure(
	list(
		merge = structure(
			c(-191, 1, -188, -187, -186, 5, 6, -183, -180, 9, 10, -179, -178, 13, 14, -172, 16, 17, -170, 19, 20, 21, -163, 23, 24, -161, -157, 27, 28, 29, -155, -153, 32, 33, -152, 35, 36, 37, 38, 39, 40, -146, -144, 43, 44, 45, 46, -141, 48, -138, 50, -137, 52, -136, 54, 55, -134, -131, 58, -126, -124, -123, -122, -121, 64, 65, 66, -119, 68, 69, 70, -118, 72, 73, 74, -115, -113, -111, -109, -107, 80, -105, -103, -101, -97, 85, 86, 87, 88, 89, 90, 91, 92, 93, -95, 95, 96, -93, -90, -89, 100, 101, -85, 103, 104, -83, -81, -80, 108, -77, 110, -75, -73, 113, -72, -68, 116, 117, 118, 119, 120, -62, 122, 123, 124, 125, 126, -58, -57, 129, -53, -52, 132, 133, -51, 135, 136, -49, -47, 139, 140, -44, -42, 143, -40, -39, 146, 147, -37, -34, 150, 151, -33, -31, -28, 155, -27, 157, 158, 159, -25, -24, -21, 163, 164, 165, 166, 167, -19, -16, 170, 171, 172, -13, 174, 175, -11, -10, -9, -6, -3, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -192, -193, -189, 3, 4, -190, 2, -184, -181, -182, 8, 11, 12, -185, 7, -173, -174, -175, -171, 18, -176, -177, -164, -165, -166, -162, -158, -159, -160, 26, -156, -154, 31, 30, 34, 25, -167, -168, -169, 22, 15, -147, -145, 42, -148, -149, -150, -142, -143, -139, -140, 51, 49, 53, 47, -151, -135, -132, -133, -127, -125, 61, 62, 63, 60, -128, -129, -120, 67, -130, 59, 71, 57, 56, 41, -116, -114, -112, -110, -108, 79, -106, -104, -102, -98, -99, -100, 84, 83, 82, 81, 78, 77, 76, -96, 94, -117, -94, -91, 99, -92, 98, -86, -87, -88, -84, -82, 107, 106, -78, -79, -76, -74, 112, 114, -69, -70, -71, 115, 111, 109, -63, -64, -65, -66, -67, 121, -59, 128, -60, -54, 131, -55, -56, 134, 130, -61, -50, -48, 138, 137, -45, -43, 142, -41, 145, 144, -46, -38, -35, -36, 149, 152, -32, -29, -30, 156, 154, 153, 148, -26, 161, -22, -23, 162, 160, 141, 127, -20, -17, -18, 169, 168, -14, -15, 173, -12, 177, 178, -7, -4, -2, 181, -5, 180, -8, 179, 176, 105, 102, 97, 75), 
			.Dim = c(192L, 2L)
		), 
		names = c("A97DCA1EQTB52", "A97DCA1MBFE185", "A97DCA1MBS12", "A97DCA1MBS30", "A97DCA1SJDS17", "A97DCA1KCD9", "A97DCA1KTB185", "A97DCA1KFE58", "A97DCA1KP18", "A97DCA1KP28", "A97DCA1KP78", "A97DCA1MBS63", "A97DCA2KP82", "A97DCA2KP86", "A97DCA2MBCD5", "A97DCEQS1", "A97DCKFE326", "A97DCMBS32", "A97DCEQS18", "A97DCKP72", "A97DCEQS25", "A97DCKS34", "A97DCKS47", "A97DCKMST147", "A97DCKMST89", "A97DCKTB6", "A97DCEQTB44", "A97DCKDS85", "A97DCMBS26", "A97DCKTB79", "A97DCKTB118", "A97DCKTB132", "A97DCKCC4", "A97DCKP25", "A97DCKTB7", "A97DCMBS9", "A97DCKS36", "A97DCKTB37", "A97DCKCD6", "A97DCMBFE149", "A97DCMBFE247", "A97DCKFE198", "A97DCKP77", "A97DCKMST52", "A97DCKS7", "A97DCKTB36", "A97DCKP36", "A97DCKTB16", "A97DCMBS28", "A97DCMBTB54", "A97DCKP5", "A97DCMBFE155", "A97DCMBFE244", "A97DCMBFE78", "A97DCMBS7", "A97DCMBS341", "A97DCKTB157", "A97DCMBP2", "A97DCMBS4", "A97DCMBTB29", "A97DCMBDS17", "A97DCEQS45", "A97DCEQS49", "A97DCKS56", "A97DCEQTB14", "A97DCKTB20", "A97DCKTB44", "A97DCKCC2", "A97DCKCC3", "A97DCKTB13", "A97DCKMST140", "A97DCKMST121", "A97DCKP43", "A97DCKP79", "A97DCKS55", "A97DCKTB124", "A97DCKFE4", "A97DCKS10", "A97DCKTB48", "A97DCKFE288", "A97DCMBFE5", "A97DCSJFE26", "A97DCKMST50", "A97DCKS14", "U97DCKFE267", "U97DCKTB119", "U97DCMBFE250", "U97DCKMST91", "E97DCEQS21", "E97DCEQS5", "E97DCKP14", "E97DCEQTB60", "U97DCKFE45", "U97DCKTB49", "D97DCD1KCD4", "D97DCD1KMST126", "D97DCD1KS2", "D97DCKP54", "D97DCKP44", "D97DCKTB181", "D97DCMBS55", "D97DCMBS56", "D97DCD2KTB23", "D97DCKMST66", "D97DCKMST30", "D97DCKP1", "D97DCKS11", "D97DCKTB27", "D97DCKTB4", "D97DCMBS35", "D97DCD2KS26", "D97DCKS15", "D97DCKS39", "D97DCMBS342", "D97DCKMST144", "D97DCKS29", "D97DCKFE53", "C97DCKCD11", "C97DCKFE372", "C97DCMBFE92", "C97DCKTB110", "C97DCMBFE14", "C97DCMBFE300", "C97DCMBFE34", "C97DCMBS37", "C97DCMBFE61", "C97DCMBTB58", "C97DCMBTB11", "C97DCMBTB10", "C97DCSJFE59", "C97DCMBS20", "C97DCMBTB3", "C97DCMBS33", "C97DCMBS80", "C97DCMBTB13", "F97DCF1EQS16", "F97DCF1KP35", "F97DCF1KP40", "F97DCF1KTB136", "F97DCF1KTB50", "F97DCF1KS50", "F97DCF1KTB165", "F97DCF1MBFE183", "K97DCEQTB43", "K97DCKTB160", "K97DCKP13", "K97DCKTB111", "K97DCMBFE71", "K97DCKTB1", "U97DCKTB17", "U97DCEQS8", "G97DCKCC1", "G97DCKFE181", "G97DCKTB56", "G97DCKFE77", "G97DCKP74", "G97DCKMST100", "G97DCKMST85", "G97DCMBTB7", "G97DCKS4", "G97DCKTB142", "G97DCKTB18", "G97DCKMST10", "G97DCKS30", "G97DCMBFE91", "G97DCKS27", "U97DCKTB22", "U97DCKMST135", "U97DCEQS29", "J97DCKFE339", "J97DCMBTB4", "J97DCKS22", "J97DCMBS41", "J97DCKTB147", "J97DCKTB14", "J97DCKS16", "U97DCKMST120", "H97DCEQTB1", "H97DCEQTB80", "H97DCKP63", "H97DCKTB158", "H97DCKS18", "H97DCKS42", "H97DCKTB176", "H97DCKTB62", "H97DCKCD2", "H97DCKMST43", "H97DCKTB140", "H97DCKTB188", "H97DCKS38", "H97DCKS43", "H97DCKTB32", "H97DCKTB52")
	), 
	.Names = c("merge", "names"), 
	class = "treeshape"
)

ComPairWise

Reads sequence alignment data from Nexus and other formats, stores alignments in aln data structure and converts to various other formats (vector, matrix).

This doesn't use trees, but here's its sample.aln alignment:


structure(
	list(
		nb = 12L, 
		nam = c("Tax1", "Tax2", "Tax3", "Tax4", "Tax5", "Tax6", "Tax7", "Tax8", "Tax9", "Tax10", "Tax11", "Tax12"), 
		seq = c("TAACACAAGGAATT", "TAACACAAGG-ATT", "TA-CACAAGGAATT", "TAACACAAGGAATT", "T---ACAAGGAATT", "TAACACAAGG-ATT", "--AC-CAAGGAATT", "TAACACAAGGAA--", "TAACACAAGGAATT", "TAACACAAGGAA?T", "TAAC-CAAGGAATT", "TAACACAAGGAATT"), 
		com = NA
	), 
	.Names = c("nb", "nam", "seq", "com"), 
	class = "alignment"
)

Geiger

Uses phylo format

  • New version of geiger uses structure where tree plus phenotypes are associated as a list

Conversion to and from ouch format

Here is the geospiza dataset from Geiger. It contains a phylo tree and data.

structure(
	list(
		geospiza.tree = structure(
			list(
				edge = structure(
					c(15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 23, 22, 21, 20, 19, 25, 25, 26, 27, 27, 26, 18, 17, 16, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1, 2, 3, 4, 5, 6, 25, 7, 26, 27, 8, 9, 10, 11, 12, 13, 14), 
					.Dim = c(26L, 2L)
				), 
				edge.length = c(0.29744, 0.04924, 0.06859, 0.13404, 0.10346, 0.0355, 0.00917, 0.07333, 0.055, 0.055, 0.055, 0.11, 0.18333, 0.1925, 0.228, 0.24479, 0.08667, 0.05167, 0.015, 0.02, 0.02, 0.035, 0.4655, 0.53409, 0.58333, 0.88077), 
				Nnode = 13L,
				tip.label = c("fuliginosa", "fortis", "magnirostris", "conirostris", "scandens", "difficilis", "pallida", "parvulus", "psittacula", "pauper", "Platyspiza", "fusca", "Pinaroloxias", "olivacea")
			), 
			.Names = c("edge", "edge.length", "Nnode", "tip.label"), 
			class = "phylo"
		), 
		geospiza.data = structure(
			list(
				wingL = c(4.4042, 4.349867, 4.224067, 4.261222, 4.244008, 4.132957, 4.265425, 3.975393, 4.1316, 4.2325, 4.1886, 4.419686, 4.23502), 
				tarsusL = c(3.03895, 2.9842, 2.898917, 2.929033, 2.894717, 2.806514, 3.08945, 2.936536, 2.97306, 3.0359, 2.9802, 3.270543, 3.04912), 
				culmenL = c(2.724667, 2.6544, 2.277183, 2.621789, 2.407025, 2.094971, 2.43025, 2.051843, 1.97442, 2.187, 2.3111, 2.331471, 2.25964), 
				beakD = c(2.823767, 2.5138, 2.0111, 2.1447, 2.362658, 1.941157, 2.01635, 1.191264, 1.87354, 2.0734, 1.5475, 2.347471, 2.23004), 
				gonysW = c(2.675983, 2.360167, 1.929983, 2.036944, 2.221867, 1.845379, 1.949125, 1.401186, 1.81334, 1.9621, 1.6301, 2.282443, 2.07394)
			), 
			.Names = c("wingL", "tarsusL", "culmenL", "beakD", "gonysW"), 
			row.names = c("magnirostris", "conirostris", "difficilis", "scandens", "fortis", "fuliginosa", "pallida", "fusca", "parvulus", "pauper", "Pinaroloxias", "Platyspiza", "psittacula"), 
			class = "data.frame"
		)
	),
	.Names = c("geospiza.tree", "geospiza.data")
)

Laser

Operations in 1.0 based on vectors of branching times; reading trees based on modifications of ape functions. However, update planned for near future.

Here's a vector of branching times from the plethodon dataset

c(96, 83.85, 61.73, 58.96, 48.76, 43.92, 39.66, 32.93, 31.63, 31.01, 12.4, 11.07, 9.24, 8.26, 7.45, 6.84, 6.03, 5.47, 5.38, 5.22, 4.62, 3.21, 1.12, 0.65, 0.46)

OUCH

Latest versions of ouch use S4 classes. The basic class is 'ouchtree'. Tree format is therefore an internal detail that can be interfaced (potentially) in a variety of ways. FWIW, tree format consists of character vector of node names, an "ancestor" vector indicating the name of each node's ancestor (the root node is distinguished by having no ancestor), and the height of a node (above the root).

Trees that can be loaded into ape can be converted to 'ouchtree' objects by means of the 'ape2ouch' function.


Current development version of OUCH is 2.1-8, available from http://tsuga.biology.lsa.umich.edu/R dput does not give information on S4 objects. So here is a getClass() for objects "ouchtree" and "hansentree", [getClass() returns the class definition]:

> getClass("ouchtree")

Slots:
                                                                                                                           
Name:        nnodes        nodes    ancestors    nodenames        times         root        nterm         term  anc.numbers
Class:      integer    character    character    character      numeric      integer      integer      integer      integer
                                             
Name:        epochs branch.times        depth
Class:         list       matrix      numeric

Known Subclasses: "browntree", "hansentree"

> getClass("hansentree")

Slots:
                                                                                                                           
Name:          call        nchar  optim.diagn      hessian         data      regimes         beta        theta        sigma
Class:         call      integer         list       matrix         list         list         list         list      numeric
                                                                                                                           
Name:         alpha     alpha.fn     sigma.fn       loglik       nnodes        nodes    ancestors   nodelabels        times
Class:      numeric     function     function      numeric      integer    character    character    character      numeric
                                                                                                 
Name:          root        nterm         term  anc.numbers       epochs branch.times        depth
Class:      integer      integer      integer      integer         list       matrix      numeric

Extends: "ouchtree"

What is listed below is an older representation of a dataset.

Here is the dput output of a loaded dataset (anolis.ssd) in OUCH (version 1.2.4 -- this doesn't look like an S4 rep, so maybe there's a different rep in an unreleased version? --Bco 13:31, 5 December 2007 (EST)). The dataset includes a tree with branch lengths, assignments of edges to OU categories (all with one mean (OU.1) or assigned to one of seven means (OU.7)) and a single character (log.SSD).


structure(
	list(
			node = c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38"), 
			species = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, "oc", "eq", "co", "aln", "ol", "in", "cu", "ri", "sa", "op", "va", "li", "ga", "gr", "br", "di", "kr", "cr", "st", "cy", "alu", "lo", "an"), 
			log.SSD = c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, -0.00512, 0.08454, 0.24703, 0.24837, 0.09844, 0.06137, 0.09501, 0.08947, 0.28893, 0.15963, 0.14766, 0.38873, 0.28768, 0.39786, 0.17106, 0.13801, 0.23478, 0.39796, 0.15737, 0.26024, 0.08216, 0.13108, 0.13547), 
			ancestor = c(NA, "1", "2", "3", "3", "3", "3", "7", "7", "9", "3", "11", "11", "3", "14", "1", "2", "4", "4", "5", "5", "6", "6", "8", "8", "9", "9", "10", "10", "12", "12", "13", "13", "13", "3", "14", "15", "15"), 
			time = c(0, 0.1614, 0.1845, 0.4778, 0.3909, 0.5026, 0.2372, 0.6986, 0.4864, 0.6838, 0.2783, 0.5529, 0.4259, 0.2826, 0.3998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), 
			OU.1 = structure(
				c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), 
				.Label = "ns", 
				class = "factor"
			),
			OU.7 = structure(
				c(7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 7L, 5L, 4L, 2L, 2L, 3L, 5L, 4L, 4L, 1L, 3L, 5L, 1L, 4L, 2L, 6L, 6L, 3L, 1L, 2L, 1L, 3L, 6L, 5L), 
				.Label = c("tg", "tc", "gb", "cg", "tw", "tr", "anc"), 
				class = "factor"
			)
		), 
	.Names = c("node", "species", "log.SSD", "ancestor", "time", "OU.1", "OU.7"), 
	row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38"), 
	class = "data.frame"
)

PaleoTS

paleoTS class stores paleontological time series data as vectors of means, variances, ages through time.

This is a paleoTS object, created by running y <- as.paleoTS(mm=rnorm(10), vv=rep(1,10), nn=rep(25,10), tt=1:10, label="white noise time series"), as in the documentation

  • mm = vector of sample means
  • vv = vector of sample variances
  • nn = vector of sample sizes
  • tt = vector of sample ages
  • MM = vector of true population means (for simulated time series)
  • genpars = generating parameters (for simulated time series)
  • label = optional label describing time series data
  • start.age = optional, indicating age of oldest sample (e.g., in millions of years ago)
  • file = file with paleoTS data; if NULL, then opens file.choose dialog
  • hh = logical; if TRUE, file with paleoTS data has a header
  • oldest = by default, samples are listed from oldest to youngest. If file is in reverse order, use oldest = "last"
  • ... = further arguments passed to read.table
structure(
	list(
		mm = c(0.327100103771548, -1.01356151290243, 0.0105737618821122, 0.546686261342602, -2.18367182493864, -0.932295623521963, 0.633174987396239, 0.517822074862835, -0.6831312994909, 0.142313612364501), 
		 vv = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1), 
		 nn = c(25, 25, 25, 25, 25, 25, 25, 25, 25, 25), 
		 tt = 1:10, 
		 MM = NULL, 
		 genpars = NULL, 
		 label = "white noise time series",    
		 start.age = NULL
	), 
	.Names = c("mm", "vv", "nn", "tt", "MM", "genpars", "label", "start.age"), 
	class = "paleoTS"
)

PhyloGR

Phylogenetic information represented as a phylogenetic variance-covariance matrix.

The following representation comes from the lacertid dataset, which is split into two parts, the variance-covariance matrix and the data.

The VCV matrix:

The Lacertid.varcov data frame has 18 rows and 18 columns, corresponding to each one of the 18 lacertidspecies; the matrix is the phylogenetic variance-covariance matrix between all 18 species; thus, each entry dij is the the sum of branch segment lengths that species i and j share in common.

structure(
	list(
		Sa = c(14.43457, 7.20412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 
		Sh = c(7.20412, 14.43457, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), 
		Tl = c(0, 0, 33.08778, 25.85733, 25.85733, 19.85733, 19.85733, 19.85733, 19.85733, 19.85733, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Mc = c(0, 0, 25.85733, 39.06145, 33.06145, 19.85733, 19.85733, 19.85733, 19.85733, 19.85733, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		My = c(0, 0, 25.85733, 33.06145, 39.06145, 19.85733, 19.85733, 19.85733, 19.85733, 19.85733, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Pb = c(0, 0, 19.85733, 19.85733, 19.85733, 39.74943, 33.27231, 33.27231, 33.27231, 26.97128, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Ph = c(0, 0, 19.85733, 19.85733, 19.85733, 33.27231, 49.86559, 45.56456, 39.57334, 26.97128, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Pg = c(0, 0, 19.85733, 19.85733, 19.85733, 33.27231, 45.56456, 49.86559, 39.57334, 26.97128, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Pa = c(0, 0, 19.85733, 19.85733, 19.85733, 33.27231, 39.57334, 39.57334, 45.57334, 26.97128, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Pm = c(0, 0, 19.85733, 19.85733, 19.85733, 26.97128, 26.97128, 26.97128, 26.97128, 33.67025, 13.25527, 13.25527, 13.25527, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Tt = c(0, 0, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 33.43136, 26.25527, 19.5563, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Ts = c(0, 0, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 26.25527, 33.43136, 19.5563, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Ae = c(0, 0, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 13.25527, 19.5563, 19.5563, 26.85733, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424), 
		Zv = c(0, 0, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 25.59572, 20.59572, 13.25527, 13.25527, 13.25527), 
		Zo = c(0, 0, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 20.59572, 25.59572, 13.25527, 13.25527, 13.25527), 
		La = c(0, 0, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 13.25527, 13.25527, 27.33445, 20.33445, 20.33445), 
		Ls = c(0, 0, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 13.25527, 13.25527, 20.33445, 33.73239, 27.03342), 
		Lv = c(0, 0, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 6.95424, 13.25527, 13.25527, 20.33445, 27.03342, 33.73239)
	), 
	.Names = c("Sa", "Sh", "Tl", "Mc", "My", "Pb", "Ph", "Pg", "Pa", "Pm", "Tt", "Ts", "Ae", "Zv", "Zo", "La", "Ls", "Lv"), 
	class = "data.frame", 
	row.names = c("Sa", "Sh", "Tl", "Mc", "My", "Pb", "Ph", "Pg", "Pa", "Pm", "Tt", "Ts", "Ae", "Zv", "Zo", "La", "Ls", "Lv")
)


The data:

  • Tips = the code for each species
  • svl = log 10 of mean adult female Snout-to-Vent length in mm
  • svl.matur = log 10 of SVL when sexual maturity (females) is reached
  • hatsvl = log 10 of hatchling svl in mm
  • hatweight = log10 of hatchling mass in grams
  • clutch.size = log10 of clutch size
  • age.mat = log10 of age at maturity in months
  • cl.freq = log10 of clutch frequency —number of clutches per year

structure(
	list(
		Tips = structure(
			c(12L, 13L, 14L, 5L, 6L, 8L, 10L, 9L, 7L, 11L, 16L, 15L, 1L, 18L, 17L, 2L, 3L, 4L), 
			.Label = c("Ae", "La", "Ls", "Lv", "Mc", "My", "Pa", "Pb", "Pg", "Ph", "Pm", "Sa", "Sh", "Tl", "Ts", "Tt", "Zo", "Zv"), 
			class = "factor"
		), 
		svl = c(1.840106, 1.684845, 2.226342, 1.820201, 1.845718, 1.741939, 1.695482, 1.78746, 1.800029, 1.767156, 1.728354, 1.812913, 1.856729, 1.744293, 1.724276, 1.835056, 2.03543, 1.993436), 
		svl.matur = c(1.763428, 1.623249, 2.120574, 1.748188, 1.778151, 1.643453, 1.591065, 1.690196, 1.724276, 1.690196, 1.662758, 1.748188, 1.78533, 1.643453, 1.633468, 1.792392, 1.959041, 1.924279), 
		hatsvl = c(1.444045, 1.359835, 1.631444, 1.39794, 1.424882, 1.380211, 1.376577, 1.431364, 1.450249, 1.394452, 1.352183, 1.369216, 1.531479, 1.318063, 1.287802, 1.424882, 1.499687, 1.513218), 
		hatweight = c(-0.242604, -0.5086383, 0.3492775, -0.3555614, -0.2596373, -0.5171264, -0.5086383, -0.3757179, -0.2898826, -0.4522253, -0.6695862, -0.5003129, 0.02160272, -0.7520267, -0.6777807, -0.2676062, -0.1152046, -0.05256628), 
		clutch.size = c(0.7781513, 0.5010593, 1.228913, 0.8561244, 0.7299743, 0.6190933, 0.3263359, 0.553883, 0.4393327, 0.7160033, 0.5314789, 0.4927604, 0.5622929, 0.647383, 0.7916906, 0.763428, 1.136721, 0.9498777), 
		age.mat = c(1.113943, 0.69897, 1.278754, 1.041393, 1, 0.90309, 0.90309, 0.90309, 0.845098, 1.079181, 0.845098, 1.113943, 1, 1.041393, 1.041393, 1.176091, 1.20412, 1.079181), 
		cl.freq = c(0.1760913, 0.30103, 0, 0.1760913, 0, 0.30103, 0.30103, 0.30103, 0.30103, 0.30103, 0.4771213, 0.30103, 0, 0, 0, 0, 0, 0)
	), 
	.Names = c("Tips", "svl", "svl.matur", "hatsvl", "hatweight", "clutch.size", "age.mat", "cl.freq"), 
	class = "data.frame", 
	row.names = c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18")
)

PhySim

Phylogenetic tree information in PhySim is stored in objects of class phylo compatible with old versions of APE (<=1.8-4) but in a format no longer usable by that program. In order to use phylogenetic trees generated by PhySim in APE first write the tree using function writePhySim.tree and then read the tree into a format compatible with APE using the APE function read.tree.

Here is a simulated tree, done by using tree <- birthdeath.tree(b=0.3, d=.1, T=10) until I got a nicely-sized tree (7 extant tips, 4 extinct)

structure(
	list(
		edge = structure(
			c("-1", "-1", "-2", "-4", "-3", "-3", "-2", "-6", "-4", "-5", "-6", "-7", "-9", "-5", "-7", "-8", "-8", "-9", "-10", "-10", "-2", "-3", "-4", "1", "2", "-5", "-6", "3", "4", "-7", "-8", "-9", "-10", "5", "6", "7", "8", "9", "10", "11", "6.0769590982338", "6.14400629975029", "6.98192119451591", "7.36252758412042", "7.8269412891695", "7.8471778855069", "8.19088140676727", "8.38077063287606", "8.49992617347275", "8.86979339440764", "9.57833177668678", "9.76429421061354", "9.77167551018244", "10", "10", "10", "10", "10", "10", "10", "1.26964348071410", "1.33669068223059", "0.904962096282112", "0.380606389604509", "1.68293498941922", "1.70317158575661", "2.11392230853346", "0.189889226108789", "1.51800497895684", "1.02261550890075", "1.38745036991952", "0.894500816205899", "0.00738129956889939", "2.15282211449310", "1.13020660559236", "0.421668223313218", "0.421668223313218", "0.235705789386457", "0.228324489817558", "0.228324489817558"), 
			.Dim = c(20L, 4L)
		), 
		edge.length = c(1.26964348071410, 1.33669068223059, 0.904962096282112, 0.380606389604509, 1.68293498941922, 1.70317158575661, 2.11392230853346, 0.189889226108789, 1.51800497895684, 1.02261550890075, 1.38745036991952, 0.894500816205899, 0.00738129956889939, 2.15282211449310, 1.13020660559236, 0.421668223313218, 0.421668223313218, 0.235705789386457, 0.228324489817558, 0.228324489817558), 
		tip.label = c("x", "x", "x", "x", "5", "6", "7", "8", "9", "10", "11"), 
		extinct_tips = 4, 
		extant_tips = 7, 
		t = 9.77167551018244, 
		T = 10
	), 
	.Names = c("edge", "edge.length", "tip.label", "extinct_tips", "extant_tips", "t", "T"), 
	class = "phylo"
)

Picante

Picante uses the ape phylo tree format. Trait data are represented as either a data frame or vector with names matching the tip.label vector in the corresponding phylo object. The evolve.trait function uses an internal representation of trait evolution along tree edges that is a list of trait values at points in discrete time for all lineages extant at that time.