OpenTreeOfLife / otindex

opentree index using postgres and pyramid
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

fields to return for verbose=True when finding studies or trees #11

Closed kcranston closed 8 years ago

kcranston commented 8 years ago

Do we want the same fields as the current oti, or any added / deleted? Example of current oti returns:

{ "matched_studies" : [ { "ot:studyPublicationReference" : "Tippery N., & Les D. 2011. Phylogenetic relationships and morphological evolution in Nymphoides (Menyanthaceae). Systematic Botany, 36: 1101-1113.", "ot:curatorName" : "bryan drew", "ot:studyId" : "pg_719", "ot:studyYear" : 2011, "ot:focalClade" : 694622, "is_deprecated" : false, "ot:focalCladeOTTTaxonName" : "Menyanthaceae", "ot:dataDeposit" : "http://purl.org/phylo/treebase/phylows/study/TB2:S11079", "ot:studyPublication" : "http://dx.doi.org/10.1600/036364411X605092" } ] }

to parse this out, the fields are studyPublicationReference, curatorName, studyId, studyYear, focalClade, is_deprecated, focalCladeOTTTaxonName, dataDeposit, and studyPublication.

kcranston commented 8 years ago

@jimallman Thoughts on this? Are there fields that we don't need for the current study list view, or fields that we should have but don't?

jimallman commented 8 years ago

We show tags (ot:tag) in the expanded list view for a study, so we'll want to add that.

Most important is that we index and return multiple values for ot:curatorName and ot:tag, as described in the long-standing issue https://github.com/OpenTreeOfLife/oti/issues/35 . This will solve lots of problems and clean up UI glitches.

kcranston commented 8 years ago

How do you get the list of ot:tag now? It isn't in the list of returned fields from find_studies?

The current ottreeindex code already handles multiple values, so that won't be an issue once we move over.

jimallman commented 8 years ago

How do you get the list of ot:tag now? It isn't in the list of returned fields from find_studies?

The existing oti captures just one value, and returns it as a simple string, for example:

 {
  "ot:studyPublicationReference" : "Salmaki, Y., Zarre, S., Ryding, O., Lindqvist, C., Bräuchler, C., Heubl, G., ... & Bendiksby, M. (2013). Molecular phylogeny of tribe Stachydeae (Lamiaceae subfamily Lamioideae). Molecular phylogenetics and evolution.",
  "ot:curatorName" : "bryan drew",
  "ot:studyId" : "pg_2679",
  "ot:studyYear" : 2013,
  "ot:focalClade" : 534796,
  "is_deprecated" : false,
  "ot:focalCladeOTTTaxonName" : "Stachydeae",
  "ot:tag" : "ingroup added;"
}
kcranston commented 8 years ago

Ah, I see. I just hadn't managed to find an example that has a tag, so I wasn't seeing that in the list of returned values.

kcranston commented 8 years ago

Full list for ot:tag and ot:curator now included for find_studies where verbose=True. See commit