{"action":"created","issue":{"url":"https://api.github.com/repos/chop-dbhi/cilantro/issues/742","labels_url":"https://api.github.com/repos/chop-dbhi/cilantro/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/chop-dbhi/cilantro/issues/742/comments","events_url":"https://api.github.com/repos/chop-dbhi/cilantro/issues/742/events","html_url":"https://github.com/chop-dbhi/cilantro/issues/742","id":46959360,"number":742,"title":"Add config option to set the default model tree","user":{"login":"bruth","id":515142,"avatar_url":"https://avatars.githubusercontent.com/u/515142?v=3","gravatar_id":"","url":"https://api.github.com/users/bruth","html_url":"https://github.com/bruth","followers_url":"https://api.github.com/users/bruth/followers","following_url":"https://api.github.com/users/bruth/following{/other_user}","gists_url":"https://api.github.com/users/bruth/gists{/gist_id}","starred_url":"https://api.github.com/users/bruth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruth/subscriptions","organizations_url":"https://api.github.com/users/bruth/orgs","repos_url":"https://api.github.com/users/bruth/repos","events_url":"https://api.github.com/users/bruth/events{/privacy}","received_events_url":"https://api.github.com/users/bruth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chop-dbhi/cilantro/labels/status:help-wanted","name":"status:help-wanted","color":"eb6420"},{"url":"https://api.github.com/repos/chop-dbhi/cilantro/labels/type:feature","name":"type:feature","color":"207de5"},{"url":"https://api.github.com/repos/chop-dbhi/cilantro/labels/version:2.4","name":"version:2.4","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-10-27T21:04:58Z","updated_at":"2015-01-23T22:10:48Z","closed_at":null,"body":"This involves setting the `tree` GET parameter on outbound request URLs. This would be implemented similarly to #686"},"comment":{"url":"https://api.github.com/repos/chop-dbhi/cilantro/issues/comments/71275287","html_url":"https://github.com/chop-dbhi/cilantro/issues/742#issuecomment-71275287","issue_url":"https://api.github.com/repos/chop-dbhi/cilantro/issues/742","id":71275287,"user":{"login":"bruth","id":515142,"avatar_url":"https://avatars.githubusercontent.com/u/515142?v=3","gravatar_id":"","url":"https://api.github.com/users/bruth","html_url":"https://github.com/bruth","followers_url":"https://api.github.com/users/bruth/followers","following_url":"https://api.github.com/users/bruth/following{/other_user}","gists_url":"https://api.github.com/users/bruth/gists{/gist_id}","starred_url":"https://api.github.com/users/bruth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruth/subscriptions","organizations_url":"https://api.github.com/users/bruth/orgs","repos_url":"https://api.github.com/users/bruth/repos","events_url":"https://api.github.com/users/bruth/events{/privacy}","received_events_url":"https://api.github.com/users/bruth/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T22:10:48Z","updated_at":"2015-01-23T22:10:48Z","body":"@sgithens Nice analysis. There are a few approaches to handling the `tree` parameter:\r\n\r\n- Add a centralized dispatcher of requests that is aware of global switches like this\r\n- Make each relevant model get the `tree` config option\r\n- Initialize a new Cilantro session with the tree parameter bound\r\n\r\nMy gut tells me that third option makes the most sense. For a bit of background, I implemented the `Session` class to enable connecting to multiple Serrano APIs from one client. The piece I have not finished is the UI control for actually switching the session, i.e. initializing the new one and updating the views on the page. This approach would handle both cases: switching contexts (i.e. the `tree`) and switching endpoints.\r\n\r\n> I'm also wondering, if under the saved queries, we should list all the users saved queries, or just the ones for the explicitly modeltree in the c.config.\r\n\r\nThat is an interesting question. Queries are not bound to particular tree, although some may not be valid simply because they included fields that are reachable by the current tree. This feels like there would need to be a higher-level means (more metadata, etc.) for switching context than just toggling the `tree` parameter. I presume the underlying need is a workflow change (e.g. sample-centric vs. patient-centric)?"}}