R Hackathon 1/Current Data Representations

From Phyloinformatics
Revision as of 16:00, 30 November 2007 by Kingaa (talk) (OUCH)
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

?

?

?

?

?

?

?

(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.

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.

ComPairWise

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

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

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.

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.

PaleoTS

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

PhyloGR

Phylogenetic information represented as a phylogenetic variance-covariance matrix.

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.