{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/43544963","id":43544963,"diff_hunk":"@@ -608,10 +611,329 @@ def centralize(mat):\n \n     \"\"\"\n     mat = closure(mat)\n-    cen = ss.gmean(mat, axis=0)\n+    cen = scipy.stats.gmean(mat, axis=0)\n     return perturb_inv(mat, cen)\n \n \n+@experimental(as_of=\"0.4.0-dev\")\n+def ancom(table, grouping,\n+          alpha=0.05,\n+          tau=0.02,\n+          theta=0.1,\n+          multiple_comparisons_correction=None,\n+          significance_test=None):\n+    r\"\"\" Performs a differential abundance test using ANCOM\n+\n+    This is done by calculating pairwise log ratios between all features\n+    and performing a significance test to determine if there is a significant\n+    difference in feature ratios with respect to the variable of interest.\n+\n+    In an experiment with only two treatments, this test tests the following\n+    hypothesis for feature :math:`i`\n+\n+    .. math::\n+\n+        H_{0i}: \\mathbb{E}[\\ln(u_i^{(1)})] = \\mathbb{E}[\\ln(u_i^{(2)})]\n+\n+    where :math:`u_i^{(1)}` is the mean abundance for feature :math:`i` in the\n+    first group and :math:`u_i^{(2)}` is the mean abundance for feature\n+    :math:`i` in the second group.\n+\n+    Parameters\n+    ----------\n+    table : pd.DataFrame\n+       A 2D matrix of counts or proportions where the rows correspond to\n+       samples and the columns correspond to features.\n+    grouping : pd.Series\n+        Vector indicating the assignment of objects to groups.  For example,\n+        these could be strings or integers denoting which group an object\n+        belongs to.\n+    alpha : float, optional\n+       Significance level for each of the statistical tests.\n+    tau : float, optional\n+       A constant used to determine an appropriate cutoff.\n+       A value close to zero indicates a conservative cutoff.\n+       This can can be anywhere between 0 and 1 exclusive.\n+    theta : float, optional\n+       Lower bound for the proportion for the W-statistic.\n+       If all W-statistics are lower than theta, then no features\n+       will be detected to be differentially significant.\n+       This can can be anywhere between 0 and 1 exclusive.\n+    multiple_comparisons_correction : {None, 'holm-bonferroni'}, optional\n+       The multiple comparison correction procedure to run.  If None,\n+       then no multiple comparison correction procedure will be run.\n+       If 'holm-boniferroni' is specified, then the Holm-Boniferroni\n+       procedure [2]_ will be run.\n+    significance_test : function, optional\n+       A statistical significance function to test for significance between\n+       classes.  This function must be able to accept multiple array_like","path":"skbio/stats/composition.py","position":96,"original_position":96,"commit_id":"6cc3ecc078d0a337623fc9280e04c1b90195dc26","original_commit_id":"bed97eb5304cd0522fea0b4d64ed4eb44d0f04c6","user":{"login":"jairideout","id":1847232,"avatar_url":"https://avatars.githubusercontent.com/u/1847232?v=3","gravatar_id":"","url":"https://api.github.com/users/jairideout","html_url":"https://github.com/jairideout","followers_url":"https://api.github.com/users/jairideout/followers","following_url":"https://api.github.com/users/jairideout/following{/other_user}","gists_url":"https://api.github.com/users/jairideout/gists{/gist_id}","starred_url":"https://api.github.com/users/jairideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jairideout/subscriptions","organizations_url":"https://api.github.com/users/jairideout/orgs","repos_url":"https://api.github.com/users/jairideout/repos","events_url":"https://api.github.com/users/jairideout/events{/privacy}","received_events_url":"https://api.github.com/users/jairideout/received_events","type":"User","site_admin":false},"body":"As a user I still don't understand what requirements my test function must meet to be used here. What we need to know is the number of arguments and their expected types (described as precisely as possible), and what the function must return (also with precise description).\r\n\r\n`array_like` just means that an input can be coerced into an `ndarray` but doesn't state anything about the dimensionality, what `dtype` is expected, etc.","created_at":"2015-10-30T19:49:55Z","updated_at":"2015-10-30T19:49:55Z","html_url":"https://github.com/biocore/scikit-bio/pull/1114#discussion_r43544963","pull_request_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114","_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/43544963"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/1114#discussion_r43544963"},"pull_request":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114","id":44265665,"html_url":"https://github.com/biocore/scikit-bio/pull/1114","diff_url":"https://github.com/biocore/scikit-bio/pull/1114.diff","patch_url":"https://github.com/biocore/scikit-bio/pull/1114.patch","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1114","number":1114,"state":"open","locked":false,"title":"Ancom","user":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"body":"Here is the a PR for integrating ANCOM  this addresses #1054\r\n\r\nTo address @ebolyen 's concern, it is only a single function with a couple of helper functions.  If you guys think it is too beefy, let me know.\r\n\r\nAlso, there were some parameters in the most up to date version of ANCOM that didn't make complete sense to me.  @wdwvt1 , do you think you could address some of these parameters?  I highlighted them in the code.\r\n\r\nTodo:\r\n- [ ] squash commits","created_at":"2015-09-04T22:01:31Z","updated_at":"2015-10-30T19:49:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4d8b21d8dde5416d6b253d947d77de797432cc4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114/commits","review_comments_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114/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/1114/comments","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/6cc3ecc078d0a337623fc9280e04c1b90195dc26","head":{"label":"mortonjt:ancom","ref":"ancom","sha":"6cc3ecc078d0a337623fc9280e04c1b90195dc26","user":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"repo":{"id":23898042,"name":"scikit-bio","full_name":"mortonjt/scikit-bio","owner":{"login":"mortonjt","id":4184797,"avatar_url":"https://avatars.githubusercontent.com/u/4184797?v=3","gravatar_id":"","url":"https://api.github.com/users/mortonjt","html_url":"https://github.com/mortonjt","followers_url":"https://api.github.com/users/mortonjt/followers","following_url":"https://api.github.com/users/mortonjt/following{/other_user}","gists_url":"https://api.github.com/users/mortonjt/gists{/gist_id}","starred_url":"https://api.github.com/users/mortonjt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mortonjt/subscriptions","organizations_url":"https://api.github.com/users/mortonjt/orgs","repos_url":"https://api.github.com/users/mortonjt/repos","events_url":"https://api.github.com/users/mortonjt/events{/privacy}","received_events_url":"https://api.github.com/users/mortonjt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mortonjt/scikit-bio","description":"Core objects, functions and statistics for working with biological data in Python.","fork":true,"url":"https://api.github.com/repos/mortonjt/scikit-bio","forks_url":"https://api.github.com/repos/mortonjt/scikit-bio/forks","keys_url":"https://api.github.com/repos/mortonjt/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mortonjt/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mortonjt/scikit-bio/teams","hooks_url":"https://api.github.com/repos/mortonjt/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/mortonjt/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/mortonjt/scikit-bio/events","assignees_url":"https://api.github.com/repos/mortonjt/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/mortonjt/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/mortonjt/scikit-bio/tags","blobs_url":"https://api.github.com/repos/mortonjt/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mortonjt/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mortonjt/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/mortonjt/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mortonjt/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/mortonjt/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/mortonjt/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/mortonjt/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/mortonjt/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/mortonjt/scikit-bio/subscription","commits_url":"https://api.github.com/repos/mortonjt/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/mortonjt/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/mortonjt/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/mortonjt/scikit-bio/issues/comments{/number}","contents_url":"https://api.github.com/repos/mortonjt/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/mortonjt/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mortonjt/scikit-bio/merges","archive_url":"https://api.github.com/repos/mortonjt/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mortonjt/scikit-bio/downloads","issues_url":"https://api.github.com/repos/mortonjt/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/mortonjt/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/mortonjt/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/mortonjt/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mortonjt/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/mortonjt/scikit-bio/releases{/id}","created_at":"2014-09-11T00:39:57Z","updated_at":"2015-04-15T23:45:33Z","pushed_at":"2015-10-30T19:43:24Z","git_url":"git://github.com/mortonjt/scikit-bio.git","ssh_url":"git@github.com:mortonjt/scikit-bio.git","clone_url":"https://github.com/mortonjt/scikit-bio.git","svn_url":"https://github.com/mortonjt/scikit-bio","homepage":"http://scikit-bio.org","size":34753,"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":"e314aa92c06a78b202d55f018f6d510cfbe55ff7","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":"scikit-bio is an open-source, BSD-licensed, Python package providing data structures, algorithms, and educational resources for bioinformatics.","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-10-27T13:03:36Z","pushed_at":"2015-10-30T19:43:25Z","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":42259,"stargazers_count":167,"watchers_count":167,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":90,"mirror_url":null,"open_issues_count":165,"forks":90,"open_issues":165,"watchers":167,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/1114"},"issue":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/1114"},"comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/1114/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/1114/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/1114/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/scikit-bio/statuses/6cc3ecc078d0a337623fc9280e04c1b90195dc26"}}}}