Common name to latin/scientific name converter
1
1
Entering edit mode
7.4 years ago
support ▴ 40

I'm looking for an API where I can enter the common name of a plant or organism into it, and it returns the scientific/latin name and vice versa. I see that ITIS has an API, they have a list of examples of how to use it here: https://www.itis.gov/ws_searchApiDescription.html

They have a search by common name feature, but it doesn't actually return the latin name like it says its supposed to, heres what it returns:

https://www.itis.gov/ITISWebService/services/ITISService/searchByCommonName?srchKey=american%20bullfrog

<ns:searchByCommonNameResponse xmlns:ns="&lt;a href=" http:="" itis_service.itis.usgs.gov"="" rel="nofollow">http://itis_service.itis.usgs.gov">
    <ns:return xmlns:ax21="&lt;a href=" http:="" data.itis_service.itis.usgs.gov="" xsd"="" rel="nofollow">http://data.itis_service.itis.usgs.gov/xsd" xmlns:ax26="http://itis_service.itis.usgs.gov/xsd" xmlns:ax23="http://metadata.itis_service.itis.usgs.gov/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ax21:SvcCommonNameList">
        <ax21:tsn xsi:nil="true"/>
        <ax21:commonNames xsi:type="ax21:SvcCommonName">
        <ax21:commonName>Morning Glory Pellicia</ax21:commonName>
            <ax21:language>English</ax21:language>
            <ax21:tsn>706771</ax21:tsn>
        </ax21:commonNames>
    </ns:return>
</ns:searchByCommonNameResponse>

They have an API for getting common and latin names from the TSN: https://www.itis.gov/ws_tsnApiDescription.html but I don't know the TSN for the plants. Is there a way to use this API to convert between common and latin names, or is there another API or tool that does it?

taxonomy plants • 9.3k views
ADD COMMENT
0
Entering edit mode

I installed Ubuntu in VirtualBox and the edirect tools work just fine. Its insane how much easier web development is in linux. I spent hours trying to integrate PostGESQL and python into a WAMP server. In Ubuntu I did it in seconds with a single command.

ADD REPLY
0
Entering edit mode

Windows is great for what it does, but web development on Windows: not even once :)

ADD REPLY
6
Entering edit mode
7.4 years ago
5heikki 11k

With NCBI Entrez Direct:

esearch -db taxonomy -query "Morning Glory Pellicia" \
    | efetch -format docsum \
    | xtract -element ScientificName
Pellicia dimidiata

You can also do it with eutils.

ADD COMMENT
0
Entering edit mode

Morning glory is actually the Ipomoea. This tool looks very useful though, I'll give it a try.

ADD REPLY
0
Entering edit mode

I'm getting this error:

PS C:\Users\horse> esearch -db taxonomy -query "Morning Glory Pellicia" | efetch -format docsum | xtract -element ScientificName
Cannot run a document in the middle of a pipeline: C:\edirect\esearch.
At line:1 char:1
+ esearch -db taxonomy -query "Morning Glory Pellicia" | efetch -format ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (C:\edirect\esearch:String) [], RuntimeException
    + FullyQualifiedErrorId : CantActivateDocumentInPipeline

PS C:\Users\horse>
ADD REPLY
0
Entering edit mode

Is this in Cygwin?

From ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/README

EDirect will run on UNIX and Macintosh computers that have the Perl language installed, and under the Cygwin UNIX-emulation environment on Windows PCs.

Also, this Pellicia spp. is actually a moth:

cellular organisms; Eukaryota; Opisthokonta; Metazoa; Eumetazoa; Bilateria; Protostomia; Ecdysozoa; Panarthropoda; Arthropoda; Mandibulata; Pancrustacea; Hexapoda; Insecta; Dicondylia; Pterygota; Neoptera; Endopterygota; Amphiesmenoptera; Lepidoptera; Glossata; Neolepidoptera; Heteroneura; Ditrysia; Obtectomera; Hesperioidea; Hesperiidae; Pyrginae; Pellicia

Genbank common name: morning glory pellicia

ADD REPLY
0
Entering edit mode

Oh right, thanks. I tried to run it in PowerShell. I got a new laptop and made the horrible mistake of not installing linux on it straight away, not I got the whole thing setup and am stuck with this Windows and all its limitations.

ADD REPLY
0
Entering edit mode

< bad advice > Just put your hard disk in the microwave < / bad advice > and start over with a clean install ;-) It's not too late to return to the linux side of the force.

ADD REPLY
0
Entering edit mode

It didn't work in the Windows version of bash either, heres the error I got:

horse@LAPTOP-72BLDDCI MINGW64 ~
$ esearch -db taxonomy -query "Morning Glory Pellicia" | efetch -format docsum | xtract -element ScientificName
501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
No do_post output returned from 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=taxonomy&term=Morning%20Glory%20Pellicia&retmax=0&usehistory=y&edirect=5.30&tool=edirect&email=horse+@LAPTOP-72BLDDCI'

Result of do_post http request is
$VAR1 = bless( {
             '_request' => bless( {
                                    '_content' => 'db=taxonomy&term=Morning%20Glory%20Pellicia&retmax=0&usehistory=y&edirect=5.30&tool=edirect&email=horse+@LAPTOP-72BLDDCI',
                                    '_headers' => bless( {
                                                           'content-type' => 'application/x-www-form-urlencoded',
                                                           'user-agent' => 'libwww-perl/6.13'
                                                         }, 'HTTP::Headers' ),
                                    '_uri' => bless( do{\(my $o = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi')}, 'URI::https' ),
                                    '_method' => 'POST'
                                  }, 'HTTP::Request' ),
             '_rc' => 501,
             '_content' => 'LWP will support https URLs if the LWP::Protocol::https module
is installed.
',
             '_headers' => bless( {
                                    'content-type' => 'text/plain',
                                    'client-date' => 'Tue, 08 Nov 2016 20:39:25 GMT',
                                    'client-warning' => 'Internal response',
                                    '::std_case' => {
                                                      'client-date' => 'Client-Date',
                                                      'client-warning' => 'Client-Warning'
                                                    }
                                  }, 'HTTP::Headers' ),
             '_msg' => 'Protocol scheme \'https\' is not supported (LWP::Protocol::https not installed)'
           }, 'HTTP::Response' );

WebEnv value not found in search output - WebEnv1
Db value not found in summary input
ADD REPLY
0
Entering edit mode

The perl it's using doesn't have LWP::Protocol::https

I don't know how Windows Bash works, maybe apt-get install liblwp-protocol-https-perl ?

ADD REPLY
0
Entering edit mode

I installed cygwin, and tried it with the version of Bash that came with it, heres the error I got:

horse@LAPTOP-72BLDDCI /usr/bin
$ esearch -db taxonomy -query "Morning Glory Pellicia"
  5 [main] dirname (14896) C:\Program Files\Git\usr\bin\dirname.exe: *** fatal error - cygheap base mismatch detected - 0x180302408/0x1802FF408.
This problem is probably due to using incompatible versions of the cygwin DLL.

Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

  5 [main] uname (15888) C:\Program Files\Git\usr\bin\uname.exe: *** fatal error - cygheap base mismatch detected -     0x180302408/0x1802FF408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
  6 [main] perl (19368) C:\Program Files\Git\usr\bin\perl.exe: *** fatal error - cygheap base mismatch detected -     0x180302408/0x1802FF408.

This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

Using any command line tools through WIndows is a nightmare. I need to switch back to linux ASAP. Its just I got my whole web development environment setup, and don't feel like rebuilding it all on linux just yet.

ADD REPLY
0
Entering edit mode

Now it requires a -pattern option too

esearch -query "Morning Glory Pellicia" -db taxonomy | efetch -format docsum | xtract -pattern DocumentSummary -element ScientificName

ADD REPLY

Login before adding your answer.

Traffic: 1522 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6