Bugfix
Taxonomy.consensus
now correctly handles list of taxids as int
Improvements
Taxonomy.consensus
andTaxonomy.lca
can now ignore missing taxa instead of raising an error
Deprecation
Taxonomy.from_json
,load
,Taxonomy.from_taxdump
andload_ncbi
are deprecated. See v2.4.0 notes for replacements
New features
- It is now possible to create Newick tree with
Taxonomy.toNewick
(Experimental)
Improvements
- Update docstrings
- Rework documentation
- Taxonomy.getXXX methods now behave like dict.get: allow default return value if key is not found, never raises an error
Improvements
- taxidTools.InvalidNodeError now ihnerits from KeyError as well, this might be more intuitive for some users
New features
- It is now possible to provide merged nodes, either form the taxdump file
merged.dmp
or directly via instances of the classMergedNode
- Attempting to retrieve a MergedNode from a Taxonomy instance will return the node it was merged with.
Bug Fix
- Instanciating a Lineagefrom a DummyNode doesn't raise an Error anymore
New features
- Added a
Taxonomy.copy()
method as a shorthand forcopy.deepcopy(Taxonomy)
- Added an
inplace
argument toTaxonomy
methodsfilterRanks()
andprune()
, allowing chose whether to return a modified deepcopy of the instance od modifiy it in place
Improvements
- Unit tests now use temporary directories to test IO methods
- The
Taxonomy.filter()
method will now return aValueError
when attempting to useroot
rank in the filtering instead of creating new root Nodes
Pending deprecation
Taxonomy.from_json
will be removed in 3.0.0, it is replaced byread_json
, a module level constructor.load
will be removed in 3.0.0, it is replaced byread_json
, a module level constructor.Taxonomy.from_taxdump
will be removed in 3.0.0, it is replaced byread_taxdump
, a module level constructor.load_ncbi
will be removed in 3.0.0, it is replaced byread_ncbi
, a better-named module level constructor.
Bug Fix
Taxonomy.listDescendant
now does filter output based on the ranks parameter- Repaired
Node.node_info
output to actually use newlines instead of printing '\n'
Distribution
- It is now possible to install taxidTools from DockerHub:
docker pull gregdenay/taxidtools
conda-forge
release should now auomatically find the last release from Github/Pypi
New features
- Attempting to access an invalid Node with the Taxonomy getitem method (
Taxonomy["node_id"]
) now returns a specifcInvalidNodeError
- Added the
load_ncbi
function as a shorthand for the constructorTaxonomy.from_taxdump
.
Bug Fix
- Fixed an error in the listDescendant method that affected the prune and filterRanks methods.
Performance
- Node.children attribute is now a set, considerably speeding up file loading.
Bug Fix
- Fixed some bugged references to Node class
Bug Fix
- Fixed broken implementation of
Taxonomy.filterRanks
Implementation changes
Node
andDummy Node
classes now ihnerit from the new _BaseNode classe. No impact on methods and properties.
Bug Fix
- Fix a bug resulting in the deletion of the children attribute of Nodes after writing to a JSON file (#2)
- Fix an issue with the creation of DummyNdoes from JSON files (#3)
Bug fix
- Fixed unlinking of removed branches in
Taxonomy.prune
Other
- Linting code, still ignoring W293 and W291 =)
Bug fix
Taxonomy.filterRanks
now correctly handles rerooted trees- Fixed and bug to
Taxonomy.consensus
where search would only be in range of the shortest lineage
Changes
- Implementation of
Taxonomy.reroot
was changed to conserve the ancestry of the input taxid. Taxonomy.reroot
was renamed toTaxonomy.prune
Additions
- Added taxid search by name
Taxonomy.getTaxid
- Released version 2. Implementation reworked from scraps.
- NOT backwards compatible