globalbioticinteractions / nomer

maps identifiers and names to other identifiers and names
GNU General Public License v3.0
19 stars 3 forks source link

make discoverlife matches resolve higher order taxa, in addition to species #167

Closed jhpoelen closed 6 months ago

jhpoelen commented 1 year ago

currently,

$ echo -e "\tApis" | nomer append discoverlife
    Apis    NONE        Apis                        
$ echo -e "\tApis mellifera" | nomer append discoverlife
    Apis mellifera  HAS_ACCEPTED_NAME   https://www.discoverlife.org/mp/20q?search=Apis+mellifera   Apis mellifera  Linnaeus, 1758  species     Animalia | Arthropoda | Insecta | Hymenoptera | Apidae | Apis | Apis mellifera  https://www.discoverlife.org/mp/20q?search=Animalia | https://www.discoverlife.org/mp/20q?search=Arthropoda | https://www.discoverlife.org/mp/20q?search=Insecta | https://www.discoverlife.org/mp/20q?search=Hymenoptera | https://www.discoverlife.org/mp/20q?search=Apidae | https://www.discoverlife.org/mp/20q?search=Apis | https://www.discoverlife.org/mp/20q?search=Apis+mellifera kingdom | phylum | class | order | family | genus | species     https://www.discoverlife.org/mp/20q?search=Apis+mellifera

expected the genus to resolve also.

as discussed with @seltmann

jhpoelen commented 6 months ago

With upcoming release, the higher order taxa are also matched via Nomer's DiscoverLife support -

with

echo -e "\tAndrenini"|\
 nomer append --include-header --properties=my.properties discoverlife\
 | mlr --itsvlite --omd cat

producing:

providedExternalId providedName relationName resolvedExternalId resolvedName resolvedAuthorship resolvedRank resolvedCommonNames resolvedPath resolvedPathIds resolvedPathNames resolvedPathAuthorships resolvedExternalUrl
Andrenini HAS_ACCEPTED_NAME https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Andrenini Andrenini tribe Animalia | Arthropoda | Insecta | Hymenoptera | Andrenidae | Andreninae | Andrenini kingdom | phylum | class | order | family | subfamily | tribe https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Andrenini
jhpoelen commented 6 months ago

Also,

$ echo -e "\tApis" | nomer append discoverlife
    Apis    HAS_ACCEPTED_NAME   https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Apis   Apis        genus       Animalia | Arthropoda | Insecta | Hymenoptera | Apidae | Apinae | Apini | None | Apis       kingdom | phylum | class | order | family | subfamily | tribe | subtribe | genushttps://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Apis
    Apis    HAS_ACCEPTED_NAME   https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Apis   Apis        subgenus        Animalia | Arthropoda | Insecta | Hymenoptera | Apidae | Apinae | Apini | None | Apis | Apis        kingdom | phylum | class | order | family | subfamily | tribe | subtribe | genus | subgenus     https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Apis
    Apis    SYNONYM_OF  https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Apis+mellifera Apis mellifera  Linnaeus, 1758  species     Animalia | Arthropoda | Insecta | Hymenoptera | Apidae | Apinae | Apini | None | Apis | Apis | Apis mellifera       kingdom | phylum | class | order | family | subfamily | tribe | subtribe | genus | subgenus | species       https://www.discoverlife.org/mp/20q?guide=Apoidea_species&search=Apis+mellifera