Closed dwinter closed 10 years ago
@mjy @jhill1 @jeetsukumaran @karolisr Might want to check that your wrapper functions for tnrs_match_names
work when a context is set , and once we have the the correct name confirmed include a test for this
... or maybe I'm an idiot,
our R function for this was breaking as we were sending a list of strings not a single string (closing the issue now)
It looks like you figured this out @dwinter? The argument is definitely context_name
, but you sent it in a list instead of a single string. Also, the context "Plants" was not valid; I think you want "Land Plants":
curl -X POST http://devapi.opentreeoflife.org/v2/tnrs/match_names -H "content-type:applicaton/json" -d '{"names":["Aster","Symphyotrichum","Erigeron","Barnadesia"], "context_name":"Land Plants"}'
{
"governing_code" : "ICN",
"unambiguous_name_ids" : [ "Barnadesia", "Erigeron", "Aster", "Symphyotrichum" ],
"unmatched_name_ids" : [ ],
"matched_name_ids" : [ "Barnadesia", "Erigeron", "Aster", "Symphyotrichum" ],
"context" : "Land plants",
"includes_deprecated_taxa" : false,
"includes_dubious_names" : false,
"includes_approximate_matches" : true,
"taxonomy" : {
"author" : "open tree of life project",
"weburl" : "https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-Taxonomy",
"source" : "ott2.8"
},
"results" : [ {
"id" : "Barnadesia",
"matches" : [ {
"is_deprecated" : false,
"is_synonym" : false,
"flags" : [ ],
"search_string" : "barnadesia",
"score" : 1.0,
"synonyms" : [ "Barnadesia Mutis", "Barnadesia" ],
"is_approximate_match" : false,
"ot:ottId" : 515698,
"matched_node_id" : 3947526,
"rank" : "",
"matched_name" : "Barnadesia",
"unique_name" : "Barnadesia",
"is_dubious" : false,
"nomenclature_code" : "ICN",
"ot:ottTaxonName" : "Barnadesia"
} ]
}, {
"id" : "Aster",
"matches" : [ {
"is_deprecated" : false,
"is_synonym" : false,
"flags" : [ "EDITED" ],
"search_string" : "aster",
"score" : 1.0,
"synonyms" : [ "Kitamuraea", "Bellidiastrum", "Baccharidiopsis", "Miyamayomena", "Aster", "Heterochaeta", "Crinitaria", "Lasallea", "Conyzanthus", "Linosyris", "Aster L.", "Wardaster", "Borkonstia", "Kitamuraster", "Virgulaster", "Chlamydites", "Weberaster", "Galatella", "Baccharidopsis", "Oreastrum" ],
"is_approximate_match" : false,
"ot:ottId" : 409712,
"matched_node_id" : 3976434,
"rank" : "",
"matched_name" : "Aster",
"unique_name" : "Aster (genus in Australasian lineages)",
"is_dubious" : false,
"nomenclature_code" : "ICN",
"ot:ottTaxonName" : "Aster"
} ]
}, {
"id" : "Erigeron",
"matches" : [ {
"is_deprecated" : false,
"is_synonym" : false,
"flags" : [ "EDITED" ],
"search_string" : "erigeron",
"score" : 1.0,
"synonyms" : [ "Darwiniothamnus", "Stenactis", "Erigeron", "Trimorpha", "fleabanes", "Achaetogeron" ],
"is_approximate_match" : false,
"ot:ottId" : 643717,
"matched_node_id" : 3977809,
"rank" : "",
"matched_name" : "Erigeron",
"unique_name" : "Erigeron",
"is_dubious" : false,
"nomenclature_code" : "ICN",
"ot:ottTaxonName" : "Erigeron"
} ]
}, {
"id" : "Symphyotrichum",
"matches" : [ {
"is_deprecated" : false,
"is_synonym" : false,
"flags" : [ "EDITED" ],
"search_string" : "symphyotrichum",
"score" : 1.0,
"synonyms" : [ "Virgulus", "Symphyotrichum" ],
"is_approximate_match" : false,
"ot:ottId" : 1058735,
"matched_node_id" : 3980020,
"rank" : "",
"matched_name" : "Symphyotrichum",
"unique_name" : "Symphyotrichum",
"is_dubious" : false,
"nomenclature_code" : "ICN",
"ot:ottTaxonName" : "Symphyotrichum"
} ]
} ]
}
Yeah, thanks @josephwb - spend ~30 mins checking and re-checkng before filing the issue, work it out 30 secs later :confounded:
The API documentation lists
context_name
as one of the paramaters to pass on totnrs/match_names
, but trying to send a request with this paramater always returns aBadInputException
I guess the parmater name is actually
context
?