{"action":"created","comment":{"url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/comments/47297629","id":47297629,"diff_hunk":"@@ -272,21 +264,19 @@ static Status translate_genotypes(const genotyper_config& cfg, const unified_sit\n \n     // reference allele maps if it contains the unified site\n     range rng(record);\n-    if (rng.contains(site.pos)) {\n+    if (rng.overlaps(site.pos)) {\n         allele_mapping[0] = 0;\n     }\n \n     // map the bcf1_t alt alleles according to unification\n     // this placeholder algorithm can do this only if the record covers\n     // exactly the same reference range as the unified site.","path":"src/genotyper.cc","position":90,"original_position":90,"commit_id":"71811f4364c6ce6420f02918a8e74eaf43c2a924","original_commit_id":"71811f4364c6ce6420f02918a8e74eaf43c2a924","user":{"login":"mlin","id":356550,"avatar_url":"https://avatars.githubusercontent.com/u/356550?v=3","gravatar_id":"","url":"https://api.github.com/users/mlin","html_url":"https://github.com/mlin","followers_url":"https://api.github.com/users/mlin/followers","following_url":"https://api.github.com/users/mlin/following{/other_user}","gists_url":"https://api.github.com/users/mlin/gists{/gist_id}","starred_url":"https://api.github.com/users/mlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlin/subscriptions","organizations_url":"https://api.github.com/users/mlin/orgs","repos_url":"https://api.github.com/users/mlin/repos","events_url":"https://api.github.com/users/mlin/events{/privacy}","received_events_url":"https://api.github.com/users/mlin/received_events","type":"User","site_admin":false},"body":"you can update this comment :)","created_at":"2015-12-10T22:38:22Z","updated_at":"2015-12-10T22:38:22Z","html_url":"https://github.com/dnanexus-rnd/GLnexus/pull/55#discussion_r47297629","pull_request_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/comments/47297629"},"html":{"href":"https://github.com/dnanexus-rnd/GLnexus/pull/55#discussion_r47297629"},"pull_request":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55","id":52617140,"html_url":"https://github.com/dnanexus-rnd/GLnexus/pull/55","diff_url":"https://github.com/dnanexus-rnd/GLnexus/pull/55.diff","patch_url":"https://github.com/dnanexus-rnd/GLnexus/pull/55.patch","issue_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/55","number":55,"state":"open","locked":false,"title":"Genotyper v1","user":{"login":"yifei-men","id":13123683,"avatar_url":"https://avatars.githubusercontent.com/u/13123683?v=3","gravatar_id":"","url":"https://api.github.com/users/yifei-men","html_url":"https://github.com/yifei-men","followers_url":"https://api.github.com/users/yifei-men/followers","following_url":"https://api.github.com/users/yifei-men/following{/other_user}","gists_url":"https://api.github.com/users/yifei-men/gists{/gist_id}","starred_url":"https://api.github.com/users/yifei-men/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifei-men/subscriptions","organizations_url":"https://api.github.com/users/yifei-men/orgs","repos_url":"https://api.github.com/users/yifei-men/repos","events_url":"https://api.github.com/users/yifei-men/events{/privacy}","received_events_url":"https://api.github.com/users/yifei-men/received_events","type":"User","site_admin":false},"body":"@mlin cc @orodeh  @geetduggal \r\n\r\nMy general plan is to:\r\n\r\n1. Pass all the curated yml test cases (after correcting for typos :/)... this is done :)\r\n2. Profile the \"improvements\" in terms of loss stats / remaining losses / new problems introduced\r\n3. Tighten the logic / code\r\n\r\n## 2 Main Algorithm Changes:\r\n1. allow unification lookup (in translate_genotype) for records which do not span the exact same range as the site; also relax REF lookup to any record that has overlap with site\r\n2. logic for managing sites with multiple records that overlap with it. We handle the following 2 cases:\r\n   1. All records are gvcf confidence records; entire site is interpreted as REF\r\n   2. Of all overlapping records, only 1 is not a gvcf confidence record. In this case, the variant record is used as the record to be used for translate_genotype (which, by virtue of unifier v1 would handle the genotype translation elegantly)\r\n\r\n  - The case where multiple vcf variant records span a site is still rendered as a loss call, due to inability to assert phasing information.\r\n\r\n## Supporting changes:\r\n- harmonized loss tracking in test/services.cc\r\n- enforced ordering of emitted genotype calls (addresses #50)\r\n\r\n## Currently working on:\r\n- ~~loss tracking needs to be refactored out of `translate_genotypes` to track input records correctly (right now the tracking for gvcf confidence records is incomplete)~~ [update 12/8]\r\n- profiling loss statistics after genotyper changes\r\n\r\n## KIV issues:\r\n- supporting \"joining\" of homozygous REF variant records (which can effectively be treated as a gvcf record)\r\n\r\n### Update 12/8\r\n- Added logic for checking that records span site; and gvcf ref records meet depth requirement (if any).\r\n- Supporting test cases (join_record*.yml) added","created_at":"2015-12-04T01:06:12Z","updated_at":"2015-12-10T22:38:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7de08e578781518b3086d0c4cb7c8adb6779be0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55/commits","review_comments_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55/comments","review_comment_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/55/comments","statuses_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/statuses/71811f4364c6ce6420f02918a8e74eaf43c2a924","head":{"label":"dnanexus-rnd:ymen-genotyper-v1","ref":"ymen-genotyper-v1","sha":"71811f4364c6ce6420f02918a8e74eaf43c2a924","user":{"login":"dnanexus-rnd","id":11299902,"avatar_url":"https://avatars.githubusercontent.com/u/11299902?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus-rnd","html_url":"https://github.com/dnanexus-rnd","followers_url":"https://api.github.com/users/dnanexus-rnd/followers","following_url":"https://api.github.com/users/dnanexus-rnd/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus-rnd/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus-rnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus-rnd/subscriptions","organizations_url":"https://api.github.com/users/dnanexus-rnd/orgs","repos_url":"https://api.github.com/users/dnanexus-rnd/repos","events_url":"https://api.github.com/users/dnanexus-rnd/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus-rnd/received_events","type":"Organization","site_admin":false},"repo":{"id":33585912,"name":"GLnexus","full_name":"dnanexus-rnd/GLnexus","owner":{"login":"dnanexus-rnd","id":11299902,"avatar_url":"https://avatars.githubusercontent.com/u/11299902?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus-rnd","html_url":"https://github.com/dnanexus-rnd","followers_url":"https://api.github.com/users/dnanexus-rnd/followers","following_url":"https://api.github.com/users/dnanexus-rnd/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus-rnd/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus-rnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus-rnd/subscriptions","organizations_url":"https://api.github.com/users/dnanexus-rnd/orgs","repos_url":"https://api.github.com/users/dnanexus-rnd/repos","events_url":"https://api.github.com/users/dnanexus-rnd/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus-rnd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dnanexus-rnd/GLnexus","description":"Scalable datastore for population genome sequencing, with on-demand joint genotyping","fork":false,"url":"https://api.github.com/repos/dnanexus-rnd/GLnexus","forks_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/forks","keys_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/teams","hooks_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/hooks","issue_events_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/events{/number}","events_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/events","assignees_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/assignees{/user}","branches_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/branches{/branch}","tags_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/tags","blobs_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/statuses/{sha}","languages_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/languages","stargazers_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/stargazers","contributors_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/contributors","subscribers_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/subscribers","subscription_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/subscription","commits_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/contents/{+path}","compare_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/merges","archive_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/downloads","issues_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues{/number}","pulls_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls{/number}","milestones_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/milestones{/number}","notifications_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/labels{/name}","releases_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/releases{/id}","created_at":"2015-04-08T05:05:05Z","updated_at":"2015-12-01T19:55:41Z","pushed_at":"2015-12-08T23:47:31Z","git_url":"git://github.com/dnanexus-rnd/GLnexus.git","ssh_url":"git@github.com:dnanexus-rnd/GLnexus.git","clone_url":"https://github.com/dnanexus-rnd/GLnexus.git","svn_url":"https://github.com/dnanexus-rnd/GLnexus","homepage":"","size":3700,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":15,"default_branch":"master"}},"base":{"label":"dnanexus-rnd:master","ref":"master","sha":"ebfa9385e2a5f7a4eaa218fe17dbe930e44b3318","user":{"login":"dnanexus-rnd","id":11299902,"avatar_url":"https://avatars.githubusercontent.com/u/11299902?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus-rnd","html_url":"https://github.com/dnanexus-rnd","followers_url":"https://api.github.com/users/dnanexus-rnd/followers","following_url":"https://api.github.com/users/dnanexus-rnd/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus-rnd/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus-rnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus-rnd/subscriptions","organizations_url":"https://api.github.com/users/dnanexus-rnd/orgs","repos_url":"https://api.github.com/users/dnanexus-rnd/repos","events_url":"https://api.github.com/users/dnanexus-rnd/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus-rnd/received_events","type":"Organization","site_admin":false},"repo":{"id":33585912,"name":"GLnexus","full_name":"dnanexus-rnd/GLnexus","owner":{"login":"dnanexus-rnd","id":11299902,"avatar_url":"https://avatars.githubusercontent.com/u/11299902?v=3","gravatar_id":"","url":"https://api.github.com/users/dnanexus-rnd","html_url":"https://github.com/dnanexus-rnd","followers_url":"https://api.github.com/users/dnanexus-rnd/followers","following_url":"https://api.github.com/users/dnanexus-rnd/following{/other_user}","gists_url":"https://api.github.com/users/dnanexus-rnd/gists{/gist_id}","starred_url":"https://api.github.com/users/dnanexus-rnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnanexus-rnd/subscriptions","organizations_url":"https://api.github.com/users/dnanexus-rnd/orgs","repos_url":"https://api.github.com/users/dnanexus-rnd/repos","events_url":"https://api.github.com/users/dnanexus-rnd/events{/privacy}","received_events_url":"https://api.github.com/users/dnanexus-rnd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dnanexus-rnd/GLnexus","description":"Scalable datastore for population genome sequencing, with on-demand joint genotyping","fork":false,"url":"https://api.github.com/repos/dnanexus-rnd/GLnexus","forks_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/forks","keys_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/teams","hooks_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/hooks","issue_events_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/events{/number}","events_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/events","assignees_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/assignees{/user}","branches_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/branches{/branch}","tags_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/tags","blobs_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/refs{/sha}","trees_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/statuses/{sha}","languages_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/languages","stargazers_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/stargazers","contributors_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/contributors","subscribers_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/subscribers","subscription_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/subscription","commits_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/commits{/sha}","git_commits_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/git/commits{/sha}","comments_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/comments{/number}","issue_comment_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/comments{/number}","contents_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/contents/{+path}","compare_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/merges","archive_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/downloads","issues_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues{/number}","pulls_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls{/number}","milestones_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/milestones{/number}","notifications_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/labels{/name}","releases_url":"https://api.github.com/repos/dnanexus-rnd/GLnexus/releases{/id}","created_at":"2015-04-08T05:05:05Z","updated_at":"2015-12-01T19:55:41Z","pushed_at":"2015-12-08T23:47:31Z","git_url":"git://github.com/dnanexus-rnd/GLnexus.git","ssh_url":"git@github.com:dnanexus-rnd/GLnexus.git","clone_url":"https://github.com/dnanexus-rnd/GLnexus.git","svn_url":"https://github.com/dnanexus-rnd/GLnexus","homepage":"","size":3700,"stargazers_count":15,"watchers_count":15,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55"},"html":{"href":"https://github.com/dnanexus-rnd/GLnexus/pull/55"},"issue":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/55"},"comments":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/dnanexus-rnd/GLnexus/statuses/71811f4364c6ce6420f02918a8e74eaf43c2a924"}}}}