Releases: niemasd/TreeSwift
Releases · niemasd/TreeSwift
TreeSwift v1.1.45
- Fixed bug in
distance_betweenfunction whenvis an ancestor ofu- Thanks, @shayesteh99!
TreeSwift v1.1.44
- 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
- Simplified handling
gzipfiles - Fixed issue when reading Nexus files with tab-delimited (rather than space-delimited)
TRANSLATElines
TreeSwift v1.1.42
- Updated
Tree.extract_tree*function behavior- Before, if the user passed in any non-
setiterable forlabels, it would automatically runlabels = set(labels)to convert it to aset - If the user passed in a string, this would result in a
setcontaining the unique individual letters of the string- E.g. if
labels == 'HELLO', this would result inlabels == {'H', 'E', 'L', 'O'}
- E.g. if
- However, the most likely user behavior for passing in a single string as
labelswould be to do something liketree.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 ofsingle_label
- This would have resulted in converting
- I've updated these functions to first check if
labelsis a string, and if so, runlabels = {labels}instead (to convert it into asetcontaining just that single string) - Thanks for catching this, @pekarj!
- Before, if the user passed in any non-
- The
suppress_unifurcationswarning I added in v1.1.40 would warn the user when deleting aNodethat had a non-Nonelabel, node attributes, or edge attributes- I've updated this warning to also not warn the user when deleting a
Nodethat only has the empty string as its label (and no node/edge attributes)
- I've updated this warning to also not warn the user when deleting a
TreeSwift v1.1.41
- Added
Tree.find_node()andNode.num_nodes()
TreeSwift v1.1.40
- Added warning if
suppress_unifurcationswill delete aNodethat has a label and/ornode_params/edge_params- To suppress all warnings in a Python script, you can add
warnings.filterwarnings('ignore')to the top of the script- See the relevant Python documentation for more details regarding handling warnings
- Thanks, @pekarj!
- To suppress all warnings in a Python script, you can add
TreeSwift v1.1.39
- Fixed a bug in
Tree.distance_betweenwhen one node is the other's parent- Thanks, @yueyujiang!
TreeSwift v1.1.38
- Fixed a typo that caused infinite recursion when attempting to copy a
treeswift.Nodeobject (thanks, @jsdoublel!)
TreeSwift v1.1.37
- Added
write_tree_nexusfunction toTreeobjects
TreeSwift v1.1.36
- Fixed bug where
node_paramsandedge_paramsweren't getting copied when extracting a subtree or copying a tree (thanks, @pekarj!)