Scientific and common names

scicomm.sci2comm(**kwargs)

Multiply dispatched method: sci2comm

Get common names from scientific names or ids

param x

(str|list(str)|Ids) One or more scientific names or partial names, or an Ids object

param db

(str) Data source, default: “ncbi”. NCBI only supported right now, other sources to come.

param **kwargs

Curl options passed on to requests.get

return

dict, keys are supplied scientific names, and values are common names

note

Remember to set your Entrez API key as ENTREZ_KEY

Usage:

from pytaxize import scicomm

# from names (str or list of str's)
scicomm.sci2comm('Helianthus annuus')
scicomm.sci2comm('Puma concolor')
scicomm.sci2comm(['Helianthus annuus', 'Poa annua'])
scicomm.sci2comm('Gadus morhua')
scicomm.sci2comm('Pomatomus saltatrix')
scicomm.sci2comm('Loxodonta africana')

scicomm.sci2comm('Lycaon pictus', db="itis")

## no results
### not a real name
scicomm.sci2comm('foo bar')
### good name, many id results, but no common names
scicomm.sci2comm("Echinacea")

# from an Ids object
from pytaxize import Ids
x = Ids('Helianthus annuus')
x.ncbi()
scicomm.sci2comm(x)
x.itis()
scicomm.sci2comm(x)
x = Ids('Lycaon pictus')
x.itis()
x.ids
scicomm.sci2comm(x)

Get common names from scientific names or ids

param x

(str|list(str)|Ids) One or more scientific names or partial names, or an Ids object

param db

(str) Data source, default: “ncbi”. NCBI only supported right now, other sources to come.

param **kwargs

Curl options passed on to requests.get

return

dict, keys are supplied scientific names, and values are common names

note

Remember to set your Entrez API key as ENTREZ_KEY

Usage:

from pytaxize import scicomm

# from names (str or list of str's)
scicomm.sci2comm('Helianthus annuus')
scicomm.sci2comm('Puma concolor')
scicomm.sci2comm(['Helianthus annuus', 'Poa annua'])
scicomm.sci2comm('Gadus morhua')
scicomm.sci2comm('Pomatomus saltatrix')
scicomm.sci2comm('Loxodonta africana')

scicomm.sci2comm('Lycaon pictus', db="itis")

## no results
### not a real name
scicomm.sci2comm('foo bar')
### good name, many id results, but no common names
scicomm.sci2comm("Echinacea")

# from an Ids object
from pytaxize import Ids
x = Ids('Helianthus annuus')
x.ncbi()
scicomm.sci2comm(x)
x.itis()
scicomm.sci2comm(x)
x = Ids('Lycaon pictus')
x.itis()
x.ids
scicomm.sci2comm(x)
Other signatures:

Ids