globalbioticinteractions / nomer

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

replacing taxon names Catalogue of Life yields no results, whereas appending names does #163

Closed jhpoelen closed 1 year ago

jhpoelen commented 1 year ago

where

echo -e "\tHomo sapiens" | nomer append col 

produces a result:

providedExternalId      
providedName            Homo sapiens
relationName            HAS_ACCEPTED_NAME
resolvedExternalId      COL:6MB3T
resolvedName            Homo sapiens
resolvedAuthorship      Linnaeus, 1758
resolvedRank            species
resolvedCommonNames     
resolvedPath            Biota | Animalia | Chordata | Vertebrata | Gnathostomata | Osteichthyes | Sarcopterygii | Tetrapoda | Amniota | Mammalia | Theria | Eutheria | Primates | Haplorrhini | Simiiformes | Hominoidea | Hominidae | Homininae | Homo | Homo sapiens
resolvedPathIds         COL:5T6MX | COL:N | COL:CH2 | COL:8V4V3 | COL:8V4V5 | COL:8VVWB | COL:8VSMX | COL:9CK8W | COL:8VLBH | COL:6224G | COL:924GT | COL:LG | COL:8ZXYB | COL:4DT | COL:4PM | COL:58L | COL:6256T | COL:JPH | COL:636X2 | COL:6MB3T
resolvedPathNames       unranked | kingdom | phylum | subphylum | infraphylum | parvphylum | gigaclass | megaclass | superclass | class | subclass | infraclass | order | suborder | infraorder | superfamily | family | subfamily | genus | species
resolvedPathAuthorships 
resolvedExternalUrl     https://www.catalogueoflife.org/data/taxon/6MB3T

but . . . when using

echo -e "\tHomo sapiens" | nomer replace col

it yield,

[blank][tab]Homo sapiens

where

COL:6MB3T[tab]Homo sapiens

was expected.

jhpoelen commented 1 year ago

Root cause was that Catalogue of Life using a more specific name relation (e.g., HAS_ACCEPTED_NAME), instead of the more generic SAME_AS. For historic reason, the command nomer replace only accepted SAME_AS relations.

With current changes, all non-NONE relation make nomer replace substitute the provided name.

jhpoelen commented 1 year ago

available via https://github.com/globalbioticinteractions/nomer/releases/tag/0.5.5