constructors module¶
constructors module API:
- taxon_database
- taxon_name
- taxon_rank
- taxon_id
Example usage:
from pytaxa import constructors as cs
cs.taxon_database("ncbi",
"http://www.ncbi.nlm.nih.gov/taxonomy",
"NCBI Taxonomy Database",
"*")
constructors API¶
-
constructors.
taxon_database
(url=None, description=None, id_regex=None)¶ Make a taxon database
Parameters: - database – [String] A database name
- url – [String] The database URL
- description – [String] A description
- id_regex – [String] id regex
Returns: A dict
Usage:
from pytaxa import constructors as cs cs.taxon_database("ncbi", "http://www.ncbi.nlm.nih.gov/taxonomy", "NCBI Taxonomy Database", "*")
-
constructors.
taxon_name
(database=None)¶ Make a taxon name
Parameters: - name – [Array] A taxonomic name
- database – [String] A database name
Returns: A dict
Usage:
from pytaxa import constructors as cs cs.taxon_name("Poa") cs.taxon_name("Poa", "ncbi") cs.taxon_name(None)
-
constructors.
taxon_rank
(database=None)¶ Make a taxon rank
Parameters: - name – [Array] A taxonomic name
- database – [String] A database name
Returns: A dict
Usage:
from pytaxa import constructors as cs cs.taxon_rank("species") cs.taxon_rank("genus", "ncbi")
-
constructors.
taxon_id
(database=None)¶ Make a taxon id
Parameters: - id – [Array] A taxonomic name
- database – [String] A database name
Returns: A dict
Usage:
from pytaxa import constructors as cs cs.taxon_id(12345) cs.taxon_id(12345, "ncbi") db = cs.taxon_database("ncbi", "http://www.ncbi.nlm.nih.gov/taxonomy", "NCBI Taxonomy Database", "*") cs.taxon_id(12345, db)