Skip to content

Releases: niemasd/TreeSwift

TreeSwift v1.1.44

26 Jun 20:16
Compare
Choose a tag to compare
  • Updated MRCA algorithm to be faster when the MRCA is relatively lower in the tree
    • Before, when looking for the MRCA of n nodes, I would do a complete upward traversal for the first n-1 nodes, and on the n-th upward traversal, I would stop the moment I found a node that's been visited n times (which is the MRCA)
    • Now, I use a queue to explore the tree upwards from the given nodes until finding a node that has been visited n times

TreeSwift v1.1.43

15 May 23:35
Compare
Choose a tag to compare
  • Simplified handling gzip files
  • Fixed issue when reading Nexus files with tab-delimited (rather than space-delimited) TRANSLATE lines

TreeSwift v1.1.42

02 Apr 17:28
Compare
Choose a tag to compare
  • Updated Tree.extract_tree* function behavior
    • Before, if the user passed in any non-set iterable for labels, it would automatically run labels = set(labels) to convert it to a set
    • If the user passed in a string, this would result in a set containing the unique individual letters of the string
      • E.g. if labels == 'HELLO', this would result in labels == {'H', 'E', 'L', 'O'}
    • However, the most likely user behavior for passing in a single string as labels would be to do something like tree.extract_tree_without(single_label) to try to remove just that single label
      • This would have resulted in converting single_label (a string) into a set containing the unique letters of single_label
    • I've updated these functions to first check if labels is a string, and if so, run labels = {labels} instead (to convert it into a set containing just that single string)
    • Thanks for catching this, @pekarj!
  • The suppress_unifurcations warning I added in v1.1.40 would warn the user when deleting a Node that had a non-None label, node attributes, or edge attributes
    • I've updated this warning to also not warn the user when deleting a Node that only has the empty string as its label (and no node/edge attributes)

TreeSwift v1.1.41

02 Apr 15:24
Compare
Choose a tag to compare
  • Added Tree.find_node() and Node.num_nodes()

TreeSwift v1.1.40

18 Mar 21:31
Compare
Choose a tag to compare
  • Added warning if suppress_unifurcations will delete a Node that has a label and/or node_params/edge_params
    • To suppress all warnings in a Python script, you can add warnings.filterwarnings('ignore') to the top of the script
    • Thanks, @pekarj!

TreeSwift v1.1.39

30 Nov 04:33
Compare
Choose a tag to compare
  • Fixed a bug in Tree.distance_between when one node is the other's parent

TreeSwift v1.1.38

16 Nov 00:30
Compare
Choose a tag to compare
  • Fixed a typo that caused infinite recursion when attempting to copy a treeswift.Node object (thanks, @JSdoubleL!)

TreeSwift v1.1.37

03 Jul 19:38
Compare
Choose a tag to compare
  • Added write_tree_nexus function to Tree objects

TreeSwift v1.1.36

03 Jul 14:57
Compare
Choose a tag to compare
  • Fixed bug where node_params and edge_params weren't getting copied when extracting a subtree or copying a tree (thanks, @pekarj!)

TreeSwift v1.1.35

28 Apr 21:34
Compare
Choose a tag to compare
  • Added ability to parse Newick files where a single tree is written across multiple lines