globalbioticinteractions / nomer

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

for discoverlife matcher "path.kingdom.name" is empty even though "path" and "pathIds" are populated #177

Closed jhpoelen closed 5 months ago

jhpoelen commented 5 months ago

with schema.properties being

nomer.append.schema.output=[{"column":0,"type":"path.kingdom.name"}, {"column":1,"type":"path"}, {"column": 2,"type":"pathNames"}]

and

echo -e "\tApis mellifera"\
 | nomer append\
 --include-header\
 --properties schema.properties\
 discoverlife

yielded a result with an empty kingdom name, where "Animalia" was expected.

providedExternalId providedName relationName resolvedPath.kingdom.name resolvedPath resolvedPathNames
Apis mellifera HAS_ACCEPTED_NAME Animalia | Arthropoda | Insecta | Hymenoptera | Apidae | Apinae | Apini | None | Apis | Apis | Apis mellifera kingdom | phylum | class | order | family | subfamily | tribe | subtribe | genus | subgenus | species

whereas

echo -e "\tApis mellifera"\
 | nomer append\
 --include-header\
 --properties schema.properties\
 globalnames

produced

providedExternalId providedName relationName resolvedPath.kingdom.name resolvedPath resolvedPathNames
Apis mellifera SAME_AS Metazoa | Eukaryota | Opisthokonta | Metazoa | Eumetazoa | Bilateria | Protostomia | Ecdysozoa | Panarthropoda | Arthropoda | Mandibulata | Pancrustacea | Hexapoda | Insecta | Dicondylia | Pterygota | Neoptera | Endopterygota | Hymenoptera | Apocrita | Aculeata | Apoidea | Anthophila | Apidae | Apinae | Apini | Apis | Apis mellifera | superkingdom | clade | kingdom | clade | clade | clade | clade | clade | phylum | clade | clade | subphylum | class | clade | subclass | infraclass | cohort | order | suborder | infraorder | superfamily | clade | family | subfamily | tribe | genus | species
jhpoelen commented 5 months ago

as discovered via https://github.com/globalbioticinteractions/globalbioticinteractions/issues/984#issuecomment-2166642997 .

jhpoelen commented 5 months ago

After applying a fix to nomer, the expected result was obtained via

echo -e "\tApis mellifera"\
 | nomer append\
 --include-header\
 --properties schema.properties\
 discoverlife
providedExternalId providedName relationName resolvedPath.kingdom.name resolvedPath resolvedPathNames
Apis mellifera HAS_ACCEPTED_NAME Animalia Animalia | Arthropoda | Insecta | Hymenoptera | Apidae | Apinae | Apini | None | Apis | Apis | Apis mellifera kingdom | phylum | class | order | family | subfamily | tribe | subtribe | genus | subgenus | species