{"action":"created","comment":{"url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/comments/133210270","pull_request_review_id":56364130,"id":133210270,"diff_hunk":"@@ -0,0 +1,83 @@\n+from collections import Counter\n+import csv\n+import progressbar\n+\n+from eva_cttv_pipeline.trait_mapping.output import output_trait\n+from eva_cttv_pipeline.trait_mapping.oxo import get_oxo_results\n+from eva_cttv_pipeline.trait_mapping.oxo import uris_to_oxo_format\n+from eva_cttv_pipeline.trait_mapping.trait import Trait\n+from eva_cttv_pipeline.trait_mapping.trait_names_parsing import parse_trait_names\n+from eva_cttv_pipeline.trait_mapping.zooma import get_zooma_results\n+\n+\n+def get_uris_for_oxo(zooma_result_list: list) -> set:\n+    \"\"\"\n+    For a list of Zooma mappings return a list of uris for the mappings in that list with a high\n+    confidence.\n+\n+    :param zooma_result_list: List with elements of class ZoomaResult\n+    :return: set of uris from high confidence Zooma mappings, for which to query OxO\n+    \"\"\"\n+    uri_set = set()\n+    for mapping in zooma_result_list:\n+        # Only use high confidence Zooma mappings for querying OxO\n+        if mapping.confidence.lower() != \"high\":\n+            continue\n+        uri_set.update([entry.uri for entry in mapping.mapping_list])","path":"eva_cttv_pipeline/trait_mapping/main.py","position":26,"original_position":26,"commit_id":"e2b3631d84d6983f7cf21424fbe03e4c8bb76b85","original_commit_id":"e2b3631d84d6983f7cf21424fbe03e4c8bb76b85","user":{"login":"cyenyxe","id":1433407,"avatar_url":"https://avatars0.githubusercontent.com/u/1433407?v=4","gravatar_id":"","url":"https://api.github.com/users/cyenyxe","html_url":"https://github.com/cyenyxe","followers_url":"https://api.github.com/users/cyenyxe/followers","following_url":"https://api.github.com/users/cyenyxe/following{/other_user}","gists_url":"https://api.github.com/users/cyenyxe/gists{/gist_id}","starred_url":"https://api.github.com/users/cyenyxe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyenyxe/subscriptions","organizations_url":"https://api.github.com/users/cyenyxe/orgs","repos_url":"https://api.github.com/users/cyenyxe/repos","events_url":"https://api.github.com/users/cyenyxe/events{/privacy}","received_events_url":"https://api.github.com/users/cyenyxe/received_events","type":"User","site_admin":false},"body":"Wouldn't this be slightly simpler as below?\r\n\r\n```python\r\nif mapping.confidence.lower() == \"high\":\r\n    uri_set.update([entry.uri for entry in mapping.mapping_list])\r\n```","created_at":"2017-08-15T14:52:51Z","updated_at":"2017-08-15T14:56:42Z","html_url":"https://github.com/EBIvariation/eva-cttv-pipeline/pull/42#discussion_r133210270","pull_request_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/comments/133210270"},"html":{"href":"https://github.com/EBIvariation/eva-cttv-pipeline/pull/42#discussion_r133210270"},"pull_request":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42","id":132720260,"html_url":"https://github.com/EBIvariation/eva-cttv-pipeline/pull/42","diff_url":"https://github.com/EBIvariation/eva-cttv-pipeline/pull/42.diff","patch_url":"https://github.com/EBIvariation/eva-cttv-pipeline/pull/42.patch","issue_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues/42","number":42,"state":"open","locked":false,"title":"EVA-808 New Open Targets trait mapping pipeline","user":{"login":"tomdcsmith","id":10744850,"avatar_url":"https://avatars0.githubusercontent.com/u/10744850?v=4","gravatar_id":"","url":"https://api.github.com/users/tomdcsmith","html_url":"https://github.com/tomdcsmith","followers_url":"https://api.github.com/users/tomdcsmith/followers","following_url":"https://api.github.com/users/tomdcsmith/following{/other_user}","gists_url":"https://api.github.com/users/tomdcsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdcsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdcsmith/subscriptions","organizations_url":"https://api.github.com/users/tomdcsmith/orgs","repos_url":"https://api.github.com/users/tomdcsmith/repos","events_url":"https://api.github.com/users/tomdcsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tomdcsmith/received_events","type":"User","site_admin":false},"body":"New script to map trait names in ClinVar records against ontology terms present in EFO.\r\n- First queries Zooma and uses any high confidence mappings in EFO\r\n- Outputs any non-high confidence EFO mappings for manual curation\r\n- Uses any high confidence non-EFO mappings to query OxO\r\n- Uses any OxO mappings with a distance of 1 and in EFO as a finished mapping\r\n- Outputs any OxO mappings in EFO with a xref distance greater than 1 for manual curation","created_at":"2017-07-27T10:52:06Z","updated_at":"2017-08-15T14:56:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2536e115c1b2eed1e6e084dcced064014320679d","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pabarcgar","id":2338089,"avatar_url":"https://avatars1.githubusercontent.com/u/2338089?v=4","gravatar_id":"","url":"https://api.github.com/users/pabarcgar","html_url":"https://github.com/pabarcgar","followers_url":"https://api.github.com/users/pabarcgar/followers","following_url":"https://api.github.com/users/pabarcgar/following{/other_user}","gists_url":"https://api.github.com/users/pabarcgar/gists{/gist_id}","starred_url":"https://api.github.com/users/pabarcgar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pabarcgar/subscriptions","organizations_url":"https://api.github.com/users/pabarcgar/orgs","repos_url":"https://api.github.com/users/pabarcgar/repos","events_url":"https://api.github.com/users/pabarcgar/events{/privacy}","received_events_url":"https://api.github.com/users/pabarcgar/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42/commits","review_comments_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42/comments","review_comment_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues/42/comments","statuses_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/statuses/e2b3631d84d6983f7cf21424fbe03e4c8bb76b85","head":{"label":"tomdcsmith:trait_mapping_pipeline_v2","ref":"trait_mapping_pipeline_v2","sha":"e2b3631d84d6983f7cf21424fbe03e4c8bb76b85","user":{"login":"tomdcsmith","id":10744850,"avatar_url":"https://avatars0.githubusercontent.com/u/10744850?v=4","gravatar_id":"","url":"https://api.github.com/users/tomdcsmith","html_url":"https://github.com/tomdcsmith","followers_url":"https://api.github.com/users/tomdcsmith/followers","following_url":"https://api.github.com/users/tomdcsmith/following{/other_user}","gists_url":"https://api.github.com/users/tomdcsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdcsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdcsmith/subscriptions","organizations_url":"https://api.github.com/users/tomdcsmith/orgs","repos_url":"https://api.github.com/users/tomdcsmith/repos","events_url":"https://api.github.com/users/tomdcsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tomdcsmith/received_events","type":"User","site_admin":false},"repo":{"id":53337200,"name":"eva-cttv-pipeline","full_name":"tomdcsmith/eva-cttv-pipeline","owner":{"login":"tomdcsmith","id":10744850,"avatar_url":"https://avatars0.githubusercontent.com/u/10744850?v=4","gravatar_id":"","url":"https://api.github.com/users/tomdcsmith","html_url":"https://github.com/tomdcsmith","followers_url":"https://api.github.com/users/tomdcsmith/followers","following_url":"https://api.github.com/users/tomdcsmith/following{/other_user}","gists_url":"https://api.github.com/users/tomdcsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdcsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdcsmith/subscriptions","organizations_url":"https://api.github.com/users/tomdcsmith/orgs","repos_url":"https://api.github.com/users/tomdcsmith/repos","events_url":"https://api.github.com/users/tomdcsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tomdcsmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomdcsmith/eva-cttv-pipeline","description":"Python package which queries CellBase REST web services to generate CTTV evidence strings","fork":true,"url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline","forks_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/forks","keys_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/teams","hooks_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/hooks","issue_events_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/events","assignees_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/tags","blobs_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/languages","stargazers_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/stargazers","contributors_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/contributors","subscribers_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/subscribers","subscription_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/subscription","commits_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/merges","archive_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/downloads","issues_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/tomdcsmith/eva-cttv-pipeline/deployments","created_at":"2016-03-07T15:43:41Z","updated_at":"2016-11-15T15:28:24Z","pushed_at":"2017-08-15T09:19:52Z","git_url":"git://github.com/tomdcsmith/eva-cttv-pipeline.git","ssh_url":"git@github.com:tomdcsmith/eva-cttv-pipeline.git","clone_url":"https://github.com/tomdcsmith/eva-cttv-pipeline.git","svn_url":"https://github.com/tomdcsmith/eva-cttv-pipeline","homepage":null,"size":12849,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"EBIvariation:master","ref":"master","sha":"f2f111050ac8cae65ef55be8abe1abd3d500e85c","user":{"login":"EBIvariation","id":6419333,"avatar_url":"https://avatars1.githubusercontent.com/u/6419333?v=4","gravatar_id":"","url":"https://api.github.com/users/EBIvariation","html_url":"https://github.com/EBIvariation","followers_url":"https://api.github.com/users/EBIvariation/followers","following_url":"https://api.github.com/users/EBIvariation/following{/other_user}","gists_url":"https://api.github.com/users/EBIvariation/gists{/gist_id}","starred_url":"https://api.github.com/users/EBIvariation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EBIvariation/subscriptions","organizations_url":"https://api.github.com/users/EBIvariation/orgs","repos_url":"https://api.github.com/users/EBIvariation/repos","events_url":"https://api.github.com/users/EBIvariation/events{/privacy}","received_events_url":"https://api.github.com/users/EBIvariation/received_events","type":"Organization","site_admin":false},"repo":{"id":53321758,"name":"eva-cttv-pipeline","full_name":"EBIvariation/eva-cttv-pipeline","owner":{"login":"EBIvariation","id":6419333,"avatar_url":"https://avatars1.githubusercontent.com/u/6419333?v=4","gravatar_id":"","url":"https://api.github.com/users/EBIvariation","html_url":"https://github.com/EBIvariation","followers_url":"https://api.github.com/users/EBIvariation/followers","following_url":"https://api.github.com/users/EBIvariation/following{/other_user}","gists_url":"https://api.github.com/users/EBIvariation/gists{/gist_id}","starred_url":"https://api.github.com/users/EBIvariation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EBIvariation/subscriptions","organizations_url":"https://api.github.com/users/EBIvariation/orgs","repos_url":"https://api.github.com/users/EBIvariation/repos","events_url":"https://api.github.com/users/EBIvariation/events{/privacy}","received_events_url":"https://api.github.com/users/EBIvariation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EBIvariation/eva-cttv-pipeline","description":"Python package which queries CellBase REST web services to generate CTTV evidence strings","fork":false,"url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline","forks_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/forks","keys_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/teams","hooks_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/hooks","issue_events_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/events","assignees_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/tags","blobs_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/languages","stargazers_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/stargazers","contributors_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/contributors","subscribers_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/subscribers","subscription_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/subscription","commits_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/merges","archive_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/downloads","issues_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/deployments","created_at":"2016-03-07T11:52:17Z","updated_at":"2016-11-15T15:20:40Z","pushed_at":"2017-08-15T09:19:54Z","git_url":"git://github.com/EBIvariation/eva-cttv-pipeline.git","ssh_url":"git@github.com:EBIvariation/eva-cttv-pipeline.git","clone_url":"https://github.com/EBIvariation/eva-cttv-pipeline.git","svn_url":"https://github.com/EBIvariation/eva-cttv-pipeline","homepage":null,"size":12770,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42"},"html":{"href":"https://github.com/EBIvariation/eva-cttv-pipeline/pull/42"},"issue":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues/42"},"comments":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/EBIvariation/eva-cttv-pipeline/statuses/e2b3631d84d6983f7cf21424fbe03e4c8bb76b85"}}}}
{"actor":{"display_login":"cyenyxe"}}