{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/36463941","id":36463941,"diff_hunk":"@@ -651,6 +651,46 @@ def count(self, tips=False):\n             return len(list(self.traverse(include_self=True)))\n \n     @experimental(as_of=\"0.4.0\")\n+    def observed_node_counts(self, tip_counts):\n+        \"\"\"Returns counts of nodes observations from counts of tip observations","path":"skbio/tree/_tree.py","position":5,"original_position":5,"commit_id":"538347e1bf6c1aac649bb43d4f0567f44614cc82","original_commit_id":"538347e1bf6c1aac649bb43d4f0567f44614cc82","user":{"login":"wasade","id":474290,"avatar_url":"https://avatars.githubusercontent.com/u/474290?v=3","gravatar_id":"","url":"https://api.github.com/users/wasade","html_url":"https://github.com/wasade","followers_url":"https://api.github.com/users/wasade/followers","following_url":"https://api.github.com/users/wasade/following{/other_user}","gists_url":"https://api.github.com/users/wasade/gists{/gist_id}","starred_url":"https://api.github.com/users/wasade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasade/subscriptions","organizations_url":"https://api.github.com/users/wasade/orgs","repos_url":"https://api.github.com/users/wasade/repos","events_url":"https://api.github.com/users/wasade/events{/privacy}","received_events_url":"https://api.github.com/users/wasade/received_events","type":"User","site_admin":false},"body":"nodes -> node","created_at":"2015-08-06T20:51:09Z","updated_at":"2015-08-06T20:51:09Z","html_url":"https://github.com/biocore/scikit-bio/pull/1027#discussion_r36463941","pull_request_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027","_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/36463941"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/1027#discussion_r36463941"},"pull_request":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027","id":41707296,"html_url":"https://github.com/biocore/scikit-bio/pull/1027","diff_url":"https://github.com/biocore/scikit-bio/pull/1027.diff","patch_url":"https://github.com/biocore/scikit-bio/pull/1027.patch","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1027","number":1027,"state":"open","locked":false,"title":"adds phylogenetic diversity metrics","user":{"login":"gregcaporaso","id":192372,"avatar_url":"https://avatars.githubusercontent.com/u/192372?v=3","gravatar_id":"","url":"https://api.github.com/users/gregcaporaso","html_url":"https://github.com/gregcaporaso","followers_url":"https://api.github.com/users/gregcaporaso/followers","following_url":"https://api.github.com/users/gregcaporaso/following{/other_user}","gists_url":"https://api.github.com/users/gregcaporaso/gists{/gist_id}","starred_url":"https://api.github.com/users/gregcaporaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregcaporaso/subscriptions","organizations_url":"https://api.github.com/users/gregcaporaso/orgs","repos_url":"https://api.github.com/users/gregcaporaso/repos","events_url":"https://api.github.com/users/gregcaporaso/events{/privacy}","received_events_url":"https://api.github.com/users/gregcaporaso/received_events","type":"User","site_admin":false},"body":"Adds PD, unweighted unifrac, and weighted unifrac (with and without normalization). \r\n\r\nTo do before merge:\r\n- [ ] interface work (how will this be imported/used)\r\n - [x] add stability decorators\r\n - [ ] should ``normalized=True`` be the default for ``weighted_unifrac``?\r\n - [x] modify ``pw_distances`` to take ``metric`` as the first argument and not have a default \r\n - [x] update ``pw_distances`` to take skbio's distance functions as strings and this should be the preferred/documented way of passing them (similar to SciPy's ``pdist``)\r\n - [x] for PD, ``u`` becomes ``counts`` to match our other alpha diversity metrics\r\n - [x] for *unifrac, ``u`` and ``v`` become ``u_counts`` and ``v_counts``, to match the alpha diversity metrics and SciPy\r\n - [x] ``phylogenetic_diversity`` renamed to ``faith_pd`` and move to ``_base.py``; make it accessible from ``skbio.diversity.alpha``\r\n - [x] ``*unifrac`` should be accessible from ``skbio.diversity.beta``, and ``skbio/diversity/beta/_stats.py`` should be renamed ``skbio/diversity/beta/_unifrac.py``\r\n\r\n- [ ] testing\r\n - [ ] expand unit tests to include direct computation of distance metrics with ``pw_distances``, including referencing the metric both by passing the function and the name (as a string)\r\n - [ ] expand unit tests to use another tree, including:\r\n  - [ ] tree with no branch lengths\r\n  - [ ] tree with duplicated tip names\r\n  - [ ] tree with one node\r\n  - [ ] non-trivial case where tips in tree are superset of ``otu_ids``\r\n - [x] add test with input vector of ``length == 0``\r\n - [ ] add test of vector with negative counts (see ``skbio.diversity.alpha._validate``)\r\n\r\n- [ ] documentation\r\n - [x] add numpy-doc (with [cite](http://aem.asm.org/content/73/5/1576.long))\r\n - [ ] add formulas for metrics\r\n - [x] update ``skbio.diversity.beta`` doctests to use a phylogenetic metric\r\n - [ ] update ``skbio.diversity.alpha`` doctests to use ``faith_pd``\r\n\r\n- [ ] misc\r\n - [x] inline ``_to_pdist_metric``\r\n\r\n- [ ] squash commits\r\n- [ ] add ChangeLog note\r\n\r\n\r\n\r\n\r\n\r\n\r\nAddresses #46, #820.\r\n","created_at":"2015-08-05T17:59:14Z","updated_at":"2015-08-06T20:51:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e49cc206b96422936de154e4f5a36f11617b4cf1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027/commits","review_comments_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027/comments","review_comment_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1027/comments","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/538347e1bf6c1aac649bb43d4f0567f44614cc82","head":{"label":"gregcaporaso:issue-46","ref":"issue-46","sha":"538347e1bf6c1aac649bb43d4f0567f44614cc82","user":{"login":"gregcaporaso","id":192372,"avatar_url":"https://avatars.githubusercontent.com/u/192372?v=3","gravatar_id":"","url":"https://api.github.com/users/gregcaporaso","html_url":"https://github.com/gregcaporaso","followers_url":"https://api.github.com/users/gregcaporaso/followers","following_url":"https://api.github.com/users/gregcaporaso/following{/other_user}","gists_url":"https://api.github.com/users/gregcaporaso/gists{/gist_id}","starred_url":"https://api.github.com/users/gregcaporaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregcaporaso/subscriptions","organizations_url":"https://api.github.com/users/gregcaporaso/orgs","repos_url":"https://api.github.com/users/gregcaporaso/repos","events_url":"https://api.github.com/users/gregcaporaso/events{/privacy}","received_events_url":"https://api.github.com/users/gregcaporaso/received_events","type":"User","site_admin":false},"repo":{"id":22703109,"name":"scikit-bio","full_name":"gregcaporaso/scikit-bio","owner":{"login":"gregcaporaso","id":192372,"avatar_url":"https://avatars.githubusercontent.com/u/192372?v=3","gravatar_id":"","url":"https://api.github.com/users/gregcaporaso","html_url":"https://github.com/gregcaporaso","followers_url":"https://api.github.com/users/gregcaporaso/followers","following_url":"https://api.github.com/users/gregcaporaso/following{/other_user}","gists_url":"https://api.github.com/users/gregcaporaso/gists{/gist_id}","starred_url":"https://api.github.com/users/gregcaporaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregcaporaso/subscriptions","organizations_url":"https://api.github.com/users/gregcaporaso/orgs","repos_url":"https://api.github.com/users/gregcaporaso/repos","events_url":"https://api.github.com/users/gregcaporaso/events{/privacy}","received_events_url":"https://api.github.com/users/gregcaporaso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gregcaporaso/scikit-bio","description":"Core objects, functions and statistics for working with biological data in Python.","fork":true,"url":"https://api.github.com/repos/gregcaporaso/scikit-bio","forks_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/forks","keys_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/teams","hooks_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/events","assignees_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/tags","blobs_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/subscription","commits_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/issues/comments{/number}","contents_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/merges","archive_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/downloads","issues_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/gregcaporaso/scikit-bio/releases{/id}","created_at":"2014-08-07T00:44:01Z","updated_at":"2015-05-04T21:38:20Z","pushed_at":"2015-08-06T19:28:44Z","git_url":"git://github.com/gregcaporaso/scikit-bio.git","ssh_url":"git@github.com:gregcaporaso/scikit-bio.git","clone_url":"https://github.com/gregcaporaso/scikit-bio.git","svn_url":"https://github.com/gregcaporaso/scikit-bio","homepage":"http://scikit-bio.org","size":32623,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biocore:master","ref":"master","sha":"c35f006e877bf93e228798c87193f55fa76252d0","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":15168264,"name":"scikit-bio","full_name":"biocore/scikit-bio","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/scikit-bio","description":"Core objects, functions and statistics for working with biological data in Python.","fork":false,"url":"https://api.github.com/repos/biocore/scikit-bio","forks_url":"https://api.github.com/repos/biocore/scikit-bio/forks","keys_url":"https://api.github.com/repos/biocore/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/scikit-bio/teams","hooks_url":"https://api.github.com/repos/biocore/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/scikit-bio/events","assignees_url":"https://api.github.com/repos/biocore/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/scikit-bio/tags","blobs_url":"https://api.github.com/repos/biocore/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/biocore/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/biocore/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/biocore/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/biocore/scikit-bio/subscription","commits_url":"https://api.github.com/repos/biocore/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/scikit-bio/merges","archive_url":"https://api.github.com/repos/biocore/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/scikit-bio/downloads","issues_url":"https://api.github.com/repos/biocore/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/biocore/scikit-bio/releases{/id}","created_at":"2013-12-13T16:24:41Z","updated_at":"2015-08-06T14:38:26Z","pushed_at":"2015-08-06T19:28:45Z","git_url":"git://github.com/biocore/scikit-bio.git","ssh_url":"git@github.com:biocore/scikit-bio.git","clone_url":"https://github.com/biocore/scikit-bio.git","svn_url":"https://github.com/biocore/scikit-bio","homepage":"http://scikit-bio.org","size":41046,"stargazers_count":147,"watchers_count":147,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":79,"mirror_url":null,"open_issues_count":129,"forks":79,"open_issues":129,"watchers":147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/1027"},"issue":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/1027"},"comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/1027/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1027/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/scikit-bio/statuses/538347e1bf6c1aac649bb43d4f0567f44614cc82"}}}}