pytaxa 0.0.7 documentation

pypi travis coverage

Info

Installation

Installation guide
How to install pytaxa.

Usage

>>> from pytaxa import constructors as cs
>>> tn = cs.taxon_name("Poa")
>>> tn['name']
'Poa'

>>> from pytaxa import Taxon
>>> x = Taxon(None)
>>> x.is_empty()
True

>>> name = cs.taxon_name("Poa")
>>> rank = cs.taxon_rank("genus", "ncbi")
>>> db = cs.taxon_database("ncbi",
...   "http://www.ncbi.nlm.nih.gov/taxonomy",
...   "NCBI Taxonomy Database",
...   "*")
>>> id = cs.taxon_id(12345, db)
>>> tx1 = Taxon(name, rank, id, "L.")
>>> tx2 = Taxon(cs.taxon_name("Poaceae"),
...   cs.taxon_rank("family", "ncbi"), cs.taxon_id(4479, db))
>>> tx3 = Taxon(cs.taxon_name("Poa annua"),
...   cs.taxon_rank("species", "ncbi"), cs.taxon_id(93036, db))
>>> from pytaxa import Taxa
>>> Taxa(tx1, tx2, tx3)
<taxa>
  no. taxa: 3
  Poa / genus / 12345
  Poaceae / family / 4479
  Poa annua / species / 93036

>>> from pytaxa import Hierarchy
>>> out = Hierarchy(tx1, tx2, tx3)
>>> out.taxa
[<Taxon>
  name: Poaceae
  rank: family
  id: 4479
  authority: , <Taxon>
  name: Poa
  rank: genus
  id: 12345
  authority: L., <Taxon>
  name: Poa annua
  rank: species
  id: 93036
  authority: ]
>>> out.ranklist
['180', '140', '220']
>>> out.all_empty()
False
>>> out.pop(ranks = "family")
<Hierarchy>
  Poa / genus / 12345
  Poa annua / species / 93036

Modules

pytaxa modules
Introduction to pytaxa modules
constructors module
The constructors module
taxa module
The taxa module
examples module
The examples module

All the rest

Changelog
See what has changed in recent pytaxa versions.
Contributors
pytaxa contributors.
Contributing
Learn how to contribute to the pytaxa project.
Contributor Code of Conduct
Expected behavior in this community. By participating in this project you agree to abide by its terms.
LICENSE
The pytaxa license.

Indices and tables