{"action":"created","comment":{"url":"https://api.github.com/repos/raphael-group/wext/pulls/comments/159164520","pull_request_review_id":86070108,"id":159164520,"diff_hunk":"@@ -5,16 +5,29 @@\n import itertools\n from constants import *\n \n-def condition(state):\n+def check_condition(state, condition):\n \n     # Define a success condition for each state, e.g., mutual exclusivity.\n \n-    if sum(state)==1:\n-        return True\n+    if condition=='exclusivity':","path":"wext/saddlepoint.py","position":11,"original_position":11,"commit_id":"2be1778245d42f6a78dd457750de5d977003e366","original_commit_id":"2be1778245d42f6a78dd457750de5d977003e366","user":{"login":"mdml","id":2043206,"avatar_url":"https://avatars0.githubusercontent.com/u/2043206?v=4","gravatar_id":"","url":"https://api.github.com/users/mdml","html_url":"https://github.com/mdml","followers_url":"https://api.github.com/users/mdml/followers","following_url":"https://api.github.com/users/mdml/following{/other_user}","gists_url":"https://api.github.com/users/mdml/gists{/gist_id}","starred_url":"https://api.github.com/users/mdml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdml/subscriptions","organizations_url":"https://api.github.com/users/mdml/orgs","repos_url":"https://api.github.com/users/mdml/repos","events_url":"https://api.github.com/users/mdml/events{/privacy}","received_events_url":"https://api.github.com/users/mdml/received_events","type":"User","site_admin":false},"body":"Would prefer if these conditions were constants (e.g. `EXCLUSIVITY='exclusivity'` and `if condition == EXCLUSIVITY`).","created_at":"2018-01-01T21:54:09Z","updated_at":"2018-01-01T22:03:51Z","html_url":"https://github.com/raphael-group/wext/pull/22#discussion_r159164520","pull_request_url":"https://api.github.com/repos/raphael-group/wext/pulls/22","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/raphael-group/wext/pulls/comments/159164520"},"html":{"href":"https://github.com/raphael-group/wext/pull/22#discussion_r159164520"},"pull_request":{"href":"https://api.github.com/repos/raphael-group/wext/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/raphael-group/wext/pulls/22","id":150181026,"html_url":"https://github.com/raphael-group/wext/pull/22","diff_url":"https://github.com/raphael-group/wext/pull/22.diff","patch_url":"https://github.com/raphael-group/wext/pull/22.patch","issue_url":"https://api.github.com/repos/raphael-group/wext/issues/22","number":22,"state":"open","locked":false,"title":"Add test statistics","user":{"login":"matthewreyna","id":8354856,"avatar_url":"https://avatars0.githubusercontent.com/u/8354856?v=4","gravatar_id":"","url":"https://api.github.com/users/matthewreyna","html_url":"https://github.com/matthewreyna","followers_url":"https://api.github.com/users/matthewreyna/followers","following_url":"https://api.github.com/users/matthewreyna/following{/other_user}","gists_url":"https://api.github.com/users/matthewreyna/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewreyna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewreyna/subscriptions","organizations_url":"https://api.github.com/users/matthewreyna/orgs","repos_url":"https://api.github.com/users/matthewreyna/repos","events_url":"https://api.github.com/users/matthewreyna/events{/privacy}","received_events_url":"https://api.github.com/users/matthewreyna/received_events","type":"User","site_admin":false},"body":"These changes add the ability to use and define different test statistics with WExT. The choice of test statistic is exposed as command-line argument for the `find_sets.py` script and defined in the check_condition function of the `wext/saddlepoint.py` script. Currently, three test statistics are available, but others are easy to define:\r\n\r\n1. Exclusivity (`exclusivity`): the number of samples with mutually exclusive mutations (exactly one mutated gene in a gene set M).\r\n2. Any co-occurrence (`any-co-occurrence`): the number of samples with any co-occurring mutations (at least two mutated genes in a gene set M).\r\n3. All co-occurrence (`all-co-occurrence`): the number of samples with all co-occurring mutations (exactly k mutated genes in a gene set M of size k).\r\n\r\nThere is a simple example in the `examples/simple` directory that uses these test statistics, and it runs in a couple of seconds. Also, the `find_sets.py` script only supports the WRE test with the enumeration search strategy, but the existing `find_exclusive_sets.py` script is unchanged.\r\n\r\nA new [entry on the wiki](https://github.com/raphael-group/wext/wiki/Find-sets) describes these options and explicitly defines each of these statistics.","created_at":"2017-11-02T00:52:30Z","updated_at":"2018-01-01T22:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3aa3e6222567232f29850ae2649ecffb0f54bb3e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/raphael-group/wext/pulls/22/commits","review_comments_url":"https://api.github.com/repos/raphael-group/wext/pulls/22/comments","review_comment_url":"https://api.github.com/repos/raphael-group/wext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raphael-group/wext/issues/22/comments","statuses_url":"https://api.github.com/repos/raphael-group/wext/statuses/2be1778245d42f6a78dd457750de5d977003e366","head":{"label":"raphael-group:add_test_statistics","ref":"add_test_statistics","sha":"2be1778245d42f6a78dd457750de5d977003e366","user":{"login":"raphael-group","id":5168500,"avatar_url":"https://avatars3.githubusercontent.com/u/5168500?v=4","gravatar_id":"","url":"https://api.github.com/users/raphael-group","html_url":"https://github.com/raphael-group","followers_url":"https://api.github.com/users/raphael-group/followers","following_url":"https://api.github.com/users/raphael-group/following{/other_user}","gists_url":"https://api.github.com/users/raphael-group/gists{/gist_id}","starred_url":"https://api.github.com/users/raphael-group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphael-group/subscriptions","organizations_url":"https://api.github.com/users/raphael-group/orgs","repos_url":"https://api.github.com/users/raphael-group/repos","events_url":"https://api.github.com/users/raphael-group/events{/privacy}","received_events_url":"https://api.github.com/users/raphael-group/received_events","type":"Organization","site_admin":false},"repo":{"id":56271347,"name":"wext","full_name":"raphael-group/wext","owner":{"login":"raphael-group","id":5168500,"avatar_url":"https://avatars3.githubusercontent.com/u/5168500?v=4","gravatar_id":"","url":"https://api.github.com/users/raphael-group","html_url":"https://github.com/raphael-group","followers_url":"https://api.github.com/users/raphael-group/followers","following_url":"https://api.github.com/users/raphael-group/following{/other_user}","gists_url":"https://api.github.com/users/raphael-group/gists{/gist_id}","starred_url":"https://api.github.com/users/raphael-group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphael-group/subscriptions","organizations_url":"https://api.github.com/users/raphael-group/orgs","repos_url":"https://api.github.com/users/raphael-group/repos","events_url":"https://api.github.com/users/raphael-group/events{/privacy}","received_events_url":"https://api.github.com/users/raphael-group/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raphael-group/wext","description":"A Weighted Exact Test for Mutually Exclusive Mutations in Cancer","fork":false,"url":"https://api.github.com/repos/raphael-group/wext","forks_url":"https://api.github.com/repos/raphael-group/wext/forks","keys_url":"https://api.github.com/repos/raphael-group/wext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raphael-group/wext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raphael-group/wext/teams","hooks_url":"https://api.github.com/repos/raphael-group/wext/hooks","issue_events_url":"https://api.github.com/repos/raphael-group/wext/issues/events{/number}","events_url":"https://api.github.com/repos/raphael-group/wext/events","assignees_url":"https://api.github.com/repos/raphael-group/wext/assignees{/user}","branches_url":"https://api.github.com/repos/raphael-group/wext/branches{/branch}","tags_url":"https://api.github.com/repos/raphael-group/wext/tags","blobs_url":"https://api.github.com/repos/raphael-group/wext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raphael-group/wext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raphael-group/wext/git/refs{/sha}","trees_url":"https://api.github.com/repos/raphael-group/wext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raphael-group/wext/statuses/{sha}","languages_url":"https://api.github.com/repos/raphael-group/wext/languages","stargazers_url":"https://api.github.com/repos/raphael-group/wext/stargazers","contributors_url":"https://api.github.com/repos/raphael-group/wext/contributors","subscribers_url":"https://api.github.com/repos/raphael-group/wext/subscribers","subscription_url":"https://api.github.com/repos/raphael-group/wext/subscription","commits_url":"https://api.github.com/repos/raphael-group/wext/commits{/sha}","git_commits_url":"https://api.github.com/repos/raphael-group/wext/git/commits{/sha}","comments_url":"https://api.github.com/repos/raphael-group/wext/comments{/number}","issue_comment_url":"https://api.github.com/repos/raphael-group/wext/issues/comments{/number}","contents_url":"https://api.github.com/repos/raphael-group/wext/contents/{+path}","compare_url":"https://api.github.com/repos/raphael-group/wext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raphael-group/wext/merges","archive_url":"https://api.github.com/repos/raphael-group/wext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raphael-group/wext/downloads","issues_url":"https://api.github.com/repos/raphael-group/wext/issues{/number}","pulls_url":"https://api.github.com/repos/raphael-group/wext/pulls{/number}","milestones_url":"https://api.github.com/repos/raphael-group/wext/milestones{/number}","notifications_url":"https://api.github.com/repos/raphael-group/wext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raphael-group/wext/labels{/name}","releases_url":"https://api.github.com/repos/raphael-group/wext/releases{/id}","deployments_url":"https://api.github.com/repos/raphael-group/wext/deployments","created_at":"2016-04-14T21:32:46Z","updated_at":"2017-11-27T03:11:52Z","pushed_at":"2017-12-01T21:37:35Z","git_url":"git://github.com/raphael-group/wext.git","ssh_url":"git@github.com:raphael-group/wext.git","clone_url":"https://github.com/raphael-group/wext.git","svn_url":"https://github.com/raphael-group/wext","homepage":"http://compbio.cs.brown.edu/projects/wext","size":151,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":6,"watchers":3,"default_branch":"master"}},"base":{"label":"raphael-group:master","ref":"master","sha":"51912f08a52a7825405f360b5230c4de9f897efe","user":{"login":"raphael-group","id":5168500,"avatar_url":"https://avatars3.githubusercontent.com/u/5168500?v=4","gravatar_id":"","url":"https://api.github.com/users/raphael-group","html_url":"https://github.com/raphael-group","followers_url":"https://api.github.com/users/raphael-group/followers","following_url":"https://api.github.com/users/raphael-group/following{/other_user}","gists_url":"https://api.github.com/users/raphael-group/gists{/gist_id}","starred_url":"https://api.github.com/users/raphael-group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphael-group/subscriptions","organizations_url":"https://api.github.com/users/raphael-group/orgs","repos_url":"https://api.github.com/users/raphael-group/repos","events_url":"https://api.github.com/users/raphael-group/events{/privacy}","received_events_url":"https://api.github.com/users/raphael-group/received_events","type":"Organization","site_admin":false},"repo":{"id":56271347,"name":"wext","full_name":"raphael-group/wext","owner":{"login":"raphael-group","id":5168500,"avatar_url":"https://avatars3.githubusercontent.com/u/5168500?v=4","gravatar_id":"","url":"https://api.github.com/users/raphael-group","html_url":"https://github.com/raphael-group","followers_url":"https://api.github.com/users/raphael-group/followers","following_url":"https://api.github.com/users/raphael-group/following{/other_user}","gists_url":"https://api.github.com/users/raphael-group/gists{/gist_id}","starred_url":"https://api.github.com/users/raphael-group/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raphael-group/subscriptions","organizations_url":"https://api.github.com/users/raphael-group/orgs","repos_url":"https://api.github.com/users/raphael-group/repos","events_url":"https://api.github.com/users/raphael-group/events{/privacy}","received_events_url":"https://api.github.com/users/raphael-group/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raphael-group/wext","description":"A Weighted Exact Test for Mutually Exclusive Mutations in Cancer","fork":false,"url":"https://api.github.com/repos/raphael-group/wext","forks_url":"https://api.github.com/repos/raphael-group/wext/forks","keys_url":"https://api.github.com/repos/raphael-group/wext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raphael-group/wext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raphael-group/wext/teams","hooks_url":"https://api.github.com/repos/raphael-group/wext/hooks","issue_events_url":"https://api.github.com/repos/raphael-group/wext/issues/events{/number}","events_url":"https://api.github.com/repos/raphael-group/wext/events","assignees_url":"https://api.github.com/repos/raphael-group/wext/assignees{/user}","branches_url":"https://api.github.com/repos/raphael-group/wext/branches{/branch}","tags_url":"https://api.github.com/repos/raphael-group/wext/tags","blobs_url":"https://api.github.com/repos/raphael-group/wext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raphael-group/wext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raphael-group/wext/git/refs{/sha}","trees_url":"https://api.github.com/repos/raphael-group/wext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raphael-group/wext/statuses/{sha}","languages_url":"https://api.github.com/repos/raphael-group/wext/languages","stargazers_url":"https://api.github.com/repos/raphael-group/wext/stargazers","contributors_url":"https://api.github.com/repos/raphael-group/wext/contributors","subscribers_url":"https://api.github.com/repos/raphael-group/wext/subscribers","subscription_url":"https://api.github.com/repos/raphael-group/wext/subscription","commits_url":"https://api.github.com/repos/raphael-group/wext/commits{/sha}","git_commits_url":"https://api.github.com/repos/raphael-group/wext/git/commits{/sha}","comments_url":"https://api.github.com/repos/raphael-group/wext/comments{/number}","issue_comment_url":"https://api.github.com/repos/raphael-group/wext/issues/comments{/number}","contents_url":"https://api.github.com/repos/raphael-group/wext/contents/{+path}","compare_url":"https://api.github.com/repos/raphael-group/wext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raphael-group/wext/merges","archive_url":"https://api.github.com/repos/raphael-group/wext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raphael-group/wext/downloads","issues_url":"https://api.github.com/repos/raphael-group/wext/issues{/number}","pulls_url":"https://api.github.com/repos/raphael-group/wext/pulls{/number}","milestones_url":"https://api.github.com/repos/raphael-group/wext/milestones{/number}","notifications_url":"https://api.github.com/repos/raphael-group/wext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raphael-group/wext/labels{/name}","releases_url":"https://api.github.com/repos/raphael-group/wext/releases{/id}","deployments_url":"https://api.github.com/repos/raphael-group/wext/deployments","created_at":"2016-04-14T21:32:46Z","updated_at":"2017-11-27T03:11:52Z","pushed_at":"2017-12-01T21:37:35Z","git_url":"git://github.com/raphael-group/wext.git","ssh_url":"git@github.com:raphael-group/wext.git","clone_url":"https://github.com/raphael-group/wext.git","svn_url":"https://github.com/raphael-group/wext","homepage":"http://compbio.cs.brown.edu/projects/wext","size":151,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raphael-group/wext/pulls/22"},"html":{"href":"https://github.com/raphael-group/wext/pull/22"},"issue":{"href":"https://api.github.com/repos/raphael-group/wext/issues/22"},"comments":{"href":"https://api.github.com/repos/raphael-group/wext/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/raphael-group/wext/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/raphael-group/wext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raphael-group/wext/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/raphael-group/wext/statuses/2be1778245d42f6a78dd457750de5d977003e366"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mdml"}}