Skip to content
This repository has been archived by the owner on Sep 22, 2019. It is now read-only.

Add '@label' property to 'matched_trees' (in singlePropertySearchForTrees response) #42

Open
jimallman opened this issue Jul 25, 2015 · 2 comments
Labels

Comments

@jimallman
Copy link
Member

The user-edited tree name is stored in the @label property in Nexson. We need this in the response to singlePropertySearchForTrees, esp. for using oti to build tree collections.

@jimallman jimallman added the bug label Jul 25, 2015
@jimallman jimallman changed the title Add 'label' property to 'matched_trees' (in singlePropertySearchForTrees response) Add '@label' property to 'matched_trees' (in singlePropertySearchForTrees response) Jul 25, 2015
@jimallman
Copy link
Member Author

If I'm reading the oti code that builds matched_trees results correctly, the problem is that the @label property is missing from both IndexedPrimitiveProperties.TREES_EXACT and IndexedPrimitiveProperties.TREES_FULLTEXT.

On closer reading, I'm expecting to find this defined as OTINodeProperty.LABEL or somesuch? 😕 It kinda looks like oti might be ignoring most of the Nexson attributes that don't use our ot: prefix.

@jimallman
Copy link
Member Author

For an example of a tree that definitely has a @Label, see
http://devtree.opentreeoflife.org/curator/study/view/tt_23/?tab=trees&tree=tree1

It's called 'Placeholder tree', as we can see in phylesystem-0. But this label does not appear in its verbose oti result:

$ curl -X POST 'http://devapi.opentreeoflife.org/oti/v1/singlePropertySearchForTrees' \
    -H 'Content-Type: application/json; charset=UTF-8' \
    --data-binary '{"property":"oti_tree_id","value":"tt_23_tree1","exact":true,"verbose":true}'

{
  "matched_studies" : [ {
    "ot:studyPublicationReference" : "Allman, Jim. Study to create a placeholder tree for the Tree Illustrator application, 1999.",
    "ot:curatorName" : "Jim Allman",
    "ot:studyId" : "tt_23",
    "matched_trees" : [ {
      "ot:studyId" : "tt_23",
      "ot:nodeLabelMode" : "",
      "ot:ottId" : 5260612,
      "is_deprecated" : false,
      "ot:branchLengthMode" : "ot:undefined",
      "ot:originalLabel" : "D",
      "oti_tree_id" : "tt_23_tree1",
      "ot:ottTaxonName" : "D6",
      "ot:branchLengthDescription" : ""
    } ],
    "ot:studyYear" : 1999,
    "is_deprecated" : false,
    "ot:focalCladeOTTTaxonName" : "",
    "ot:dataDeposit" : "http://www.example.com/",
    "ot:studyPublication" : "asdf",
    "ot:comment" : "This is just to provide a simple placeholder tree for the Tree Illustrator."
  } ]
}

jimallman added a commit to OpenTreeOfLife/opentree that referenced this issue Sep 27, 2015
This gives a nicer default, e.g., 'Tree tree801 from Davis, 2010'. N.B.
that [this is *all* we're going to see until oti starts returning proper
'@Label' properties for matched
trees](OpenTreeOfLife/oti#42).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant