{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/220687284","pull_request_review_id":159144764,"id":220687284,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDY4NzI4NA==","diff_hunk":"@@ -1846,5 +1846,32 @@ public static boolean isXnp(final String reference, final String alternate) {\n \n         return result;\n     }\n+\n+    /**\n+     * Returns true if the context represents an MNP. If the context supplied contains the GVCF NON_REF symbolic\n+     * allele, then the determination is performed after discarding the NON_REF symbolic allele.\n+     *\n+     * @param ctx a Variant context\n+     * @return true if the context represents an unmixed MNP (i.e. all alleles are non-symbolic and of the same\n+     *         length > 1), false otherwise\n+     */\n+    public static boolean isMnpWithoutNonRef(final VariantContext ctx) {\n+        final List<Allele> alleles = ctx.getAlleles();\n+        int length = -1;","path":"src/main/java/org/broadinstitute/hellbender/utils/variant/GATKVariantContextUtils.java","position":15,"original_position":15,"commit_id":"7ed298ea887274f76b8fac5290a6f59f1a595e1b","original_commit_id":"7ed298ea887274f76b8fac5290a6f59f1a595e1b","user":{"login":"davidbenjamin","id":8438890,"node_id":"MDQ6VXNlcjg0Mzg4OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8438890?v=4","gravatar_id":"","url":"https://api.github.com/users/davidbenjamin","html_url":"https://github.com/davidbenjamin","followers_url":"https://api.github.com/users/davidbenjamin/followers","following_url":"https://api.github.com/users/davidbenjamin/following{/other_user}","gists_url":"https://api.github.com/users/davidbenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbenjamin/subscriptions","organizations_url":"https://api.github.com/users/davidbenjamin/orgs","repos_url":"https://api.github.com/users/davidbenjamin/repos","events_url":"https://api.github.com/users/davidbenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/davidbenjamin/received_events","type":"User","site_admin":false},"body":"This code could be more concise as follows:\r\n\r\n```\r\nfinal int refAlleleLength = allleles.get(0).length();\r\nif (alleles.stream().anyMatch(a -> a.length() < 2 || a.length() != refAlleleLength)) {\r\n   return false;\r\n} else {\r\n   return alleles.stream().noneMatch(a -> a.isSymbolic() && a.equals(Allele.NON_REF_ALLELE));\r\n}\r\n```\r\nUsually the decision to `return false` will be made on the first pass, so that's not really a performance issue, although the streams will be a lot slower than the `for` loop.  You can decide if that's a problem.","created_at":"2018-09-26T19:06:48Z","updated_at":"2018-09-26T19:07:20Z","html_url":"https://github.com/broadinstitute/gatk/pull/5182#discussion_r220687284","pull_request_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/220687284"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/5182#discussion_r220687284"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182","id":215112532,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE1MTEyNTMy","html_url":"https://github.com/broadinstitute/gatk/pull/5182","diff_url":"https://github.com/broadinstitute/gatk/pull/5182.diff","patch_url":"https://github.com/broadinstitute/gatk/pull/5182.patch","issue_url":"https://api.github.com/repos/broadinstitute/gatk/issues/5182","number":5182,"state":"open","locked":false,"title":"Allow MNP calling in GVCF mode with stern warnings about not trying …","user":{"login":"tfenne","id":1609210,"node_id":"MDQ6VXNlcjE2MDkyMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1609210?v=4","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"body":"…joint-genotyping from the resulting GVCFs.\r\n\r\n@ldgauthier & @davidbenjamin this PR is a follow up from our short conversation in #4650 a couple of months ago, where I was wanting to generate GVCFs with MNP support.\r\n\r\nMy goal here is that I really want to be able to generate a single VCF that a) gives me reference confidence and b) gives me MNPs for close by variants.  This is for a clinical pipeline where all calling is done one sample at a time, so the problem of joint-genotyping from different MNP representations doesn't come up.  I did briefly look at using `--emit-ref-confidence BP_RESOLUTION` but that has two issues that make me prefer this route:\r\n\r\n1) The generated files are really very large because they have a row for every single BP\r\n2) More problematic, is that when there is a MNP of say `ACG/GCT` two things happen that are less than ideal from my perspective.  The first is that rows are emitted into the VCF for all three positions (the variant at A's position, and two `<NON_REF>` lines at the positions for the C and T respectively).  Secondly, when one or more bases is the same in both MNP alleles (the C in this case) that base is output with a very high hom-ref GQ, which feels wrong!\r\n\r\nI'm more than happy to modify this PR to address any concerns you have (e.g. adding a `--force-mnps-with-gvcfs` parameter that has to be specified, or requiring `--unsafe` to enable this).  I'm also open to other solutions, but this seemed expedient and reasonable for folks running single-sample pipelines like you see in clinical settings.","created_at":"2018-09-12T22:19:40Z","updated_at":"2018-09-26T19:07:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"585b37b3c297a4f84bdb7e65e383d3297c7927af","assignee":{"login":"ldgauthier","id":6578548,"node_id":"MDQ6VXNlcjY1Nzg1NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6578548?v=4","gravatar_id":"","url":"https://api.github.com/users/ldgauthier","html_url":"https://github.com/ldgauthier","followers_url":"https://api.github.com/users/ldgauthier/followers","following_url":"https://api.github.com/users/ldgauthier/following{/other_user}","gists_url":"https://api.github.com/users/ldgauthier/gists{/gist_id}","starred_url":"https://api.github.com/users/ldgauthier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldgauthier/subscriptions","organizations_url":"https://api.github.com/users/ldgauthier/orgs","repos_url":"https://api.github.com/users/ldgauthier/repos","events_url":"https://api.github.com/users/ldgauthier/events{/privacy}","received_events_url":"https://api.github.com/users/ldgauthier/received_events","type":"User","site_admin":false},"assignees":[{"login":"ldgauthier","id":6578548,"node_id":"MDQ6VXNlcjY1Nzg1NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/6578548?v=4","gravatar_id":"","url":"https://api.github.com/users/ldgauthier","html_url":"https://github.com/ldgauthier","followers_url":"https://api.github.com/users/ldgauthier/followers","following_url":"https://api.github.com/users/ldgauthier/following{/other_user}","gists_url":"https://api.github.com/users/ldgauthier/gists{/gist_id}","starred_url":"https://api.github.com/users/ldgauthier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldgauthier/subscriptions","organizations_url":"https://api.github.com/users/ldgauthier/orgs","repos_url":"https://api.github.com/users/ldgauthier/repos","events_url":"https://api.github.com/users/ldgauthier/events{/privacy}","received_events_url":"https://api.github.com/users/ldgauthier/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/issues/5182/comments","statuses_url":"https://api.github.com/repos/broadinstitute/gatk/statuses/7ed298ea887274f76b8fac5290a6f59f1a595e1b","head":{"label":"tfenne:tf_enable_gvcf_and_mnp_together","ref":"tf_enable_gvcf_and_mnp_together","sha":"7ed298ea887274f76b8fac5290a6f59f1a595e1b","user":{"login":"tfenne","id":1609210,"node_id":"MDQ6VXNlcjE2MDkyMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1609210?v=4","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"repo":{"id":148548376,"node_id":"MDEwOlJlcG9zaXRvcnkxNDg1NDgzNzY=","name":"gatk","full_name":"tfenne/gatk","private":false,"owner":{"login":"tfenne","id":1609210,"node_id":"MDQ6VXNlcjE2MDkyMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1609210?v=4","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"html_url":"https://github.com/tfenne/gatk","description":"Official code repository for GATK versions 4 and up","fork":true,"url":"https://api.github.com/repos/tfenne/gatk","forks_url":"https://api.github.com/repos/tfenne/gatk/forks","keys_url":"https://api.github.com/repos/tfenne/gatk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tfenne/gatk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tfenne/gatk/teams","hooks_url":"https://api.github.com/repos/tfenne/gatk/hooks","issue_events_url":"https://api.github.com/repos/tfenne/gatk/issues/events{/number}","events_url":"https://api.github.com/repos/tfenne/gatk/events","assignees_url":"https://api.github.com/repos/tfenne/gatk/assignees{/user}","branches_url":"https://api.github.com/repos/tfenne/gatk/branches{/branch}","tags_url":"https://api.github.com/repos/tfenne/gatk/tags","blobs_url":"https://api.github.com/repos/tfenne/gatk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tfenne/gatk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tfenne/gatk/git/refs{/sha}","trees_url":"https://api.github.com/repos/tfenne/gatk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tfenne/gatk/statuses/{sha}","languages_url":"https://api.github.com/repos/tfenne/gatk/languages","stargazers_url":"https://api.github.com/repos/tfenne/gatk/stargazers","contributors_url":"https://api.github.com/repos/tfenne/gatk/contributors","subscribers_url":"https://api.github.com/repos/tfenne/gatk/subscribers","subscription_url":"https://api.github.com/repos/tfenne/gatk/subscription","commits_url":"https://api.github.com/repos/tfenne/gatk/commits{/sha}","git_commits_url":"https://api.github.com/repos/tfenne/gatk/git/commits{/sha}","comments_url":"https://api.github.com/repos/tfenne/gatk/comments{/number}","issue_comment_url":"https://api.github.com/repos/tfenne/gatk/issues/comments{/number}","contents_url":"https://api.github.com/repos/tfenne/gatk/contents/{+path}","compare_url":"https://api.github.com/repos/tfenne/gatk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tfenne/gatk/merges","archive_url":"https://api.github.com/repos/tfenne/gatk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tfenne/gatk/downloads","issues_url":"https://api.github.com/repos/tfenne/gatk/issues{/number}","pulls_url":"https://api.github.com/repos/tfenne/gatk/pulls{/number}","milestones_url":"https://api.github.com/repos/tfenne/gatk/milestones{/number}","notifications_url":"https://api.github.com/repos/tfenne/gatk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tfenne/gatk/labels{/name}","releases_url":"https://api.github.com/repos/tfenne/gatk/releases{/id}","deployments_url":"https://api.github.com/repos/tfenne/gatk/deployments","created_at":"2018-09-12T22:10:56Z","updated_at":"2018-09-19T23:16:14Z","pushed_at":"2018-09-25T17:00:03Z","git_url":"git://github.com/tfenne/gatk.git","ssh_url":"git@github.com:tfenne/gatk.git","clone_url":"https://github.com/tfenne/gatk.git","svn_url":"https://github.com/tfenne/gatk","homepage":"https://software.broadinstitute.org/gatk","size":238513,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"f0dddbc686a87cf969f4be5b0594edda081690c1","user":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":27452807,"node_id":"MDEwOlJlcG9zaXRvcnkyNzQ1MjgwNw==","name":"gatk","full_name":"broadinstitute/gatk","private":false,"owner":{"login":"broadinstitute","id":393552,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5MzU1Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/broadinstitute/gatk","description":"Official code repository for GATK versions 4 and up","fork":false,"url":"https://api.github.com/repos/broadinstitute/gatk","forks_url":"https://api.github.com/repos/broadinstitute/gatk/forks","keys_url":"https://api.github.com/repos/broadinstitute/gatk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/gatk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/gatk/teams","hooks_url":"https://api.github.com/repos/broadinstitute/gatk/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/gatk/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/gatk/events","assignees_url":"https://api.github.com/repos/broadinstitute/gatk/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/gatk/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/gatk/tags","blobs_url":"https://api.github.com/repos/broadinstitute/gatk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/gatk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/gatk/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/gatk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/gatk/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/gatk/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/gatk/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/gatk/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/gatk/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/gatk/subscription","commits_url":"https://api.github.com/repos/broadinstitute/gatk/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/gatk/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/gatk/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/gatk/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/gatk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/gatk/merges","archive_url":"https://api.github.com/repos/broadinstitute/gatk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/gatk/downloads","issues_url":"https://api.github.com/repos/broadinstitute/gatk/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/gatk/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/gatk/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/gatk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/gatk/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/gatk/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/gatk/deployments","created_at":"2014-12-02T20:50:36Z","updated_at":"2018-09-26T18:42:15Z","pushed_at":"2018-09-26T18:53:03Z","git_url":"git://github.com/broadinstitute/gatk.git","ssh_url":"git@github.com:broadinstitute/gatk.git","clone_url":"https://github.com/broadinstitute/gatk.git","svn_url":"https://github.com/broadinstitute/gatk","homepage":"https://software.broadinstitute.org/gatk","size":241334,"stargazers_count":468,"watchers_count":468,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":185,"mirror_url":null,"archived":false,"open_issues_count":969,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":185,"open_issues":969,"watchers":468,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/5182"},"issue":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/5182"},"comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/5182/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/5182/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/gatk/statuses/7ed298ea887274f76b8fac5290a6f59f1a595e1b"}},"author_association":"NONE"}}
{"actor":{"display_login":"davidbenjamin"}}