Recent Releases of https://github.com/arklumpus/treenode
https://github.com/arklumpus/treenode - Version 1.7.0
New features
NWKA.ParseTreenow has an optional argumentslashSeparatorthat can be used to allow forward slash characters as attribute separators. This istrueby default (which preserves existing behaviour); set this tofalseif you expect/to appear within taxon names.- New
NWKA.TryParseTreemethod, whose return value can be used to determine whether an error occurred while parsing the Newick tree string.
- C#
Published by arklumpus 7 months ago
https://github.com/arklumpus/treenode - Version 1.6.0
New features
- Added options to compute Robinson-Foulds distances with arbitrary weightings and to normalise the distances.
- C#
Published by arklumpus over 1 year ago
https://github.com/arklumpus/treenode - Version 1.5.4
Bugfixes
- Fixed regression in 1.5.3 that caused issues when opening tree files with spaces between attributes.
- C#
Published by arklumpus over 2 years ago
https://github.com/arklumpus/treenode - Version 1.5.3
Bugfixes
- Improved performance of the
GetConsensusmethod (which now returns null instead of of throwing an exception when there are not enough compatible splits to build a tree). - Added missing documentation for a parameter of the
TreeDistancesmethod. - Fixed a bug that caused spaces to be removed from node labels when the label was not included within quotes.
- C#
Published by arklumpus over 2 years ago
https://github.com/arklumpus/treenode - Version 1.5.1
Bugfixes
- Fixed a null-reference exception occurring while computing Robinson-Foulds distances.
- C#
Published by arklumpus about 3 years ago
https://github.com/arklumpus/treenode - Version 1.5.0
TreeListnow implementsIReadOnlyList<TreeNode>, in addition toIList<TreeNode>.- Greatly improved performance of Robinson-Foulds distance calculations.
- New methods to compute the edge-length distance of trees.
- New methods to compute a distance matrix of trees, using the weighted/unweighted Robinson-Foulds distances and/or the edge-length distance.
- C#
Published by arklumpus about 3 years ago
https://github.com/arklumpus/treenode - Version 1.4.0
New features
- New methods to compute parsimony scores (both regular Fitch parsimony and Sankoff weighted parsimony) and likelihoods. These are found in the
PhyloTree.SequenceScores.ParsimonyScoreandPhyloTree.SequenceScore.LikelihoodScoresclasses, respectively.
- C#
Published by arklumpus about 3 years ago
https://github.com/arklumpus/treenode - Version 1.3.1
New features
Added classes and methods to create random sequences and to simulate sequence evolution. This can be achieved using the classes in the PhyloTree.SequenceSimulation namespace.
- The
Sequenceclass contains methods to create random sequences and to simulate the evolution of a sequence over a certain amount of time, including indel (insertion/deletion) simulation. - The
SequenceSimulationstatic class contains methods to simulate sequence evolution along a phylogenetic tree.
Many of these methods require a RateMatrix argument, which specifies the transition rate matrix for the sequence evolution model. The RateMatrix.DNA and RateMatrix.Protein classes contain the most common DNA and protein evolution matrices; otherwise, an arbitrary matrix (even non-time reversible) can be created using the MutableRateMatrix or ImmutableRateMatrix classes. This can also be used to create and simulate the evolution of a sequence of morphological characters, rather than DNA or proteins.
Bugfixes
- NEXUS files containing trees that are introduced by
UTREEstatements rather thanTREEstatements (e.g., as produced by MCMCTree) are now parsed correctly.
- C#
Published by arklumpus about 3 years ago
https://github.com/arklumpus/treenode - Version 1.2.0
New features
- Added method
GetDepthto compute the depth of a node (i.e., the number of branches from a node up to the root node). Added methods to compute tree statistics:
- The method
SackinIndexcan be used to compute the Sackin index of a tree. - The method
CollessIndexcan be used to compute the Colless index of a tree. - The static
GetCollessExpectationYHKmethod can be used to compute the expected value of the Colless index for a tree with the specified number of leaves under the YHK model. - The method
NumberOfCherriescan be used to compute the number of cherries in the tree.
These methods accept an optional
NullHypothesisparameter that is used to determine what kind of normalisation is applied to the computed statistics: when this isNullHypothesis.None(the default), the value is not normalised; when this isNullHypothesis.PDA, the value is normalised assuming a proportional-to-distinguished-arrangements model (i.e., all labelled topologies are equally probable); when this isNullHypothesis.YHK, the value is normalised assuming a Yule-Harding-Kingman model (i.e. a pure-birth process).- The method
Added method
GetSplitto get the split corresponding to a branch, andGetSplitsto get all the splits in the tree.Added static
RobinsonFouldsDistancemethod to compute the Robinson-Foulds distance between two trees, and an instance method with the same name. In addition to the two trees, both methods require a boolean parameter calledweighted: if this istrue, the RF distance is weighted with the branch lengths (i.e., it is computed as the sum of the lengths of branches that induce a split that is present in one tree but not the other); if this isfalse, the classical RF distance is computed (which is the same as assuming that all branches have length 1).Added
Prunemethod to prune a node from the tree.Added the
PhyloTree.TreeBuildingnamespace, containing static methods to create trees in different ways:- The
RandomTreeclass contains methods to create random topologies or trees under the YHK and PDA models. - The
CoalescentTreeclass contains methods to create labelled or unlabelled trees under the coalescent model. - The
BirthDeathTreeclass contains methods to create labelled or unlabelled trees under the birth-death model. - The
DistanceMatrixclass contains methods to create a distance matrix from a sequence alignment (using various sequence evolution models). - The
UPGMAclass contains methods to build UPGMA trees from a distance matrix or from a sequence alignment. - The
NeighborJoiningclass contains methods to build Neighbour-Joining trees from a distance matrix or from a sequence alignment.
All the methods to create labelled trees (both random trees and UPGMA/Neighbour-joining) have an optional
constraintparameter that can be used to constrain the tree returned by those methods.- The
Added methods
CreateDistanceMatrixDoubleandCreateDistanceMatrixFloatto compute a distance matrix from a tree. The returned distance matrix contains the path distances between every pair of tips in the tree. The two methods do the same thing, but one returns adouble[][]array, and the other afloat[][]array.
Bugfixes
- The NEXUS parser now properly deals with start-of-word trivia in NEXUS files.
- Multifurcating trees are now unrooted correctly.
- C#
Published by arklumpus over 3 years ago