OpenTreeOfLife/peyotl — pull request #74 by mtholder (2014-12-02 12:51:17+00:00)
Title: Cull non matching trees

adds support for a cull_nonmatching parameter to the study fetching/conversion.

I won't merge this, as it changes the behavior of phylesystem-api.

This would address @kcranston 's request to have a nexson with only the requested tree on https://github.com/OpenTreeOfLife/phylesystem-api/issues/135

Notes:
1. deploying this will enable:
http://devapi.opentreeoflife.org/v2/study/pg_719/tree/tree1294?cull_nonmatching=true
to return the same tree as
http://devapi.opentreeoflife.org/v2/study/pg_719/tree/tree1294
but the latter call just returns the tree part of the NexSON (lacking metadata or OTU definitions.
No changes to phylesystem-api are required to make this live. (scary, huh?)

2. there may be references in comments/annotations in the NexSON to non-existent trees, nodes, edges, or their contents if a tree is culled.

3. this does resolve the inconsistency that you only get the SHA and other metadata if you request the whole study in NexSON. The fine-grained access methods, such as this one, just return the data.