{"action":"created","issue":{"url":"https://api.github.com/repos/hammerlab/cohorts/issues/68","repository_url":"https://api.github.com/repos/hammerlab/cohorts","labels_url":"https://api.github.com/repos/hammerlab/cohorts/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/hammerlab/cohorts/issues/68/comments","events_url":"https://api.github.com/repos/hammerlab/cohorts/issues/68/events","html_url":"https://github.com/hammerlab/cohorts/pull/68","id":164135558,"number":68,"title":"Summarize provenance","user":{"login":"jburos","id":923453,"avatar_url":"https://avatars.githubusercontent.com/u/923453?v=3","gravatar_id":"","url":"https://api.github.com/users/jburos","html_url":"https://github.com/jburos","followers_url":"https://api.github.com/users/jburos/followers","following_url":"https://api.github.com/users/jburos/following{/other_user}","gists_url":"https://api.github.com/users/jburos/gists{/gist_id}","starred_url":"https://api.github.com/users/jburos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jburos/subscriptions","organizations_url":"https://api.github.com/users/jburos/orgs","repos_url":"https://api.github.com/users/jburos/repos","events_url":"https://api.github.com/users/jburos/events{/privacy}","received_events_url":"https://api.github.com/users/jburos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-06T17:52:31Z","updated_at":"2016-07-07T21:07:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hammerlab/cohorts/pulls/68","html_url":"https://github.com/hammerlab/cohorts/pull/68","diff_url":"https://github.com/hammerlab/cohorts/pull/68.diff","patch_url":"https://github.com/hammerlab/cohorts/pull/68.patch"},"body":"Added two functions to Cohort class, with a goal of allowing a high-level summary of provenance in data reports (such as ipynbs). Welcome feedback on the implementation of this.\r\n\r\nFunctions include: \r\n\r\n1. `summarize_provenance`: \r\n    - tests for equivalence in provenance among all patients in each cache dir\r\n    - summarizes provenance (if equivalent among all patients) for each cache dir\r\n    - (prints warning if per-patient cache not equivalent within a cache_dir)\r\n\r\n2. `summarize_unique_provenance`:\r\n    - summarizes per-cache-dir provenance, suitable for display\r\n         * if equivalent among all cache dirs, prints single provenance\r\n         * otherwise, prints per-cache-dir provenance  \r\n\r\nBoth functions include among provenance files a hash of the `as_dataframe` object, which can be used to identify if two analyses are using the most recent data.\r\n\r\nExample output: \r\n\r\n```\r\n> cohort.summarize_unique_provenance()\r\nOut[2]:\r\n{u'cohorts': u'0+untagged.188.g6260531.dirty',\r\n u'dfhash': -8604513298553306351,\r\n u'isovar': u'0.0.6',\r\n u'mhctools': u'0.2.3',\r\n u'numpy': u'1.11.0',\r\n u'pandas': u'0.18.1',\r\n u'pyensembl': u'0.9.1',\r\n u'scipy': u'0.17.0',\r\n u'topiary': u'0.0.21',\r\n u'varcode': u'0.4.14'}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/hammerlab/cohorts/issues/comments/231207632","html_url":"https://github.com/hammerlab/cohorts/pull/68#issuecomment-231207632","issue_url":"https://api.github.com/repos/hammerlab/cohorts/issues/68","id":231207632,"user":{"login":"tavinathanson","id":322932,"avatar_url":"https://avatars.githubusercontent.com/u/322932?v=3","gravatar_id":"","url":"https://api.github.com/users/tavinathanson","html_url":"https://github.com/tavinathanson","followers_url":"https://api.github.com/users/tavinathanson/followers","following_url":"https://api.github.com/users/tavinathanson/following{/other_user}","gists_url":"https://api.github.com/users/tavinathanson/gists{/gist_id}","starred_url":"https://api.github.com/users/tavinathanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tavinathanson/subscriptions","organizations_url":"https://api.github.com/users/tavinathanson/orgs","repos_url":"https://api.github.com/users/tavinathanson/repos","events_url":"https://api.github.com/users/tavinathanson/events{/privacy}","received_events_url":"https://api.github.com/users/tavinathanson/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T21:07:24Z","updated_at":"2016-07-07T21:07:24Z","body":"Feel free to merge once Travis is green 👍 "}}
{"actor":{"display_login":"tavinathanson"}}