{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/picard/pulls/comments/48462902","id":48462902,"diff_hunk":"@@ -73,34 +94,34 @@ public String getPartition(final CollectVariantCallingMetrics.VariantCallingDeta\n      * then returned.\n      */\n     private final CollectionUtil.DefaultingMap<String, VariantCallingDetailMetrics> sampleMetricsMap =\n-            new CollectionUtil.DefaultingMap<String, VariantCallingDetailMetrics>(\n-                    new CollectionUtil.DefaultingMap.Factory<VariantCallingDetailMetrics, String>() {\n-                        @Override\n-                        public VariantCallingDetailMetrics make(final String sampleName) {\n-                            final VariantCallingDetailMetrics detail = new VariantCallingDetailMetrics();\n-                            detail.SAMPLE_ALIAS = sampleName;\n-                            return detail;\n-                        }\n+            new CollectionUtil.DefaultingMap<>(\n+                    sampleName -> {\n+                        final VariantCallingDetailMetrics detail = new VariantCallingDetailMetrics();\n+                        detail.SAMPLE_ALIAS = sampleName;\n+                        return detail;\n                     }, true);\n \n     public CallingMetricAccumulator(final DbSnpBitSetUtil.DbSnpBitSets dbsnp) {\n         this.dbsnp = dbsnp;\n     }\n \n+    public void setup(final VCFHeader vcfHeader){\n+        //noop.\n+    }\n+\n     /** Incorporates the provided variant's data into the metric analysis. */\n     @Override\n     public void accumulate(final VariantContext vc) {\n-        progress.record(vc.getChr(), vc.getStart());\n+        progress.record(vc.getContig(), vc.getStart());\n         if (!isVariantExcluded(vc)) {\n             final String singletonSample = getSingletonSample(vc);\n             updateSummaryMetric(summaryMetric, null, vc, singletonSample != null); // The summary metric has no genotype.\n-            for (final String sampleName : vc.getSampleNames()) {\n-                // Skip homozygous reference calls.\n-                if (!vc.getGenotype(sampleName).isHomRef()) {\n-                    updateDetailMetric(sampleMetricsMap.get(sampleName), vc.getGenotype(sampleName), vc,\n-                            sampleName.equals(singletonSample));\n-                }\n-            }\n+\n+            vc.getSampleNames().stream()\n+                    .filter(sampleName -> !vc.getGenotype(sampleName).isHomRef())","path":"src/java/picard/vcf/CallingMetricAccumulator.java","position":137,"original_position":137,"commit_id":"2fcee517dfa40ae86d61d16c145419133742adba","original_commit_id":"2fcee517dfa40ae86d61d16c145419133742adba","user":{"login":"eitanbanks","id":2751498,"avatar_url":"https://avatars.githubusercontent.com/u/2751498?v=3","gravatar_id":"","url":"https://api.github.com/users/eitanbanks","html_url":"https://github.com/eitanbanks","followers_url":"https://api.github.com/users/eitanbanks/followers","following_url":"https://api.github.com/users/eitanbanks/following{/other_user}","gists_url":"https://api.github.com/users/eitanbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/eitanbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eitanbanks/subscriptions","organizations_url":"https://api.github.com/users/eitanbanks/orgs","repos_url":"https://api.github.com/users/eitanbanks/repos","events_url":"https://api.github.com/users/eitanbanks/events{/privacy}","received_events_url":"https://api.github.com/users/eitanbanks/received_events","type":"User","site_admin":false},"body":"I don't know much about the streaming operators, but are you filtering here if the genotype is NOT hom ref?\r\n","created_at":"2015-12-28T04:40:53Z","updated_at":"2015-12-28T04:40:53Z","html_url":"https://github.com/broadinstitute/picard/pull/368#discussion_r48462902","pull_request_url":"https://api.github.com/repos/broadinstitute/picard/pulls/368","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/comments/48462902"},"html":{"href":"https://github.com/broadinstitute/picard/pull/368#discussion_r48462902"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/368"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/picard/pulls/368","id":54509274,"html_url":"https://github.com/broadinstitute/picard/pull/368","diff_url":"https://github.com/broadinstitute/picard/pull/368.diff","patch_url":"https://github.com/broadinstitute/picard/pull/368.patch","issue_url":"https://api.github.com/repos/broadinstitute/picard/issues/368","number":368,"state":"open","locked":false,"title":"Add option to collect metrics from a single-sample GVCF file using CollectVariantCallingMetrics","user":{"login":"yfarjoun","id":2745554,"avatar_url":"https://avatars.githubusercontent.com/u/2745554?v=3","gravatar_id":"","url":"https://api.github.com/users/yfarjoun","html_url":"https://github.com/yfarjoun","followers_url":"https://api.github.com/users/yfarjoun/followers","following_url":"https://api.github.com/users/yfarjoun/following{/other_user}","gists_url":"https://api.github.com/users/yfarjoun/gists{/gist_id}","starred_url":"https://api.github.com/users/yfarjoun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yfarjoun/subscriptions","organizations_url":"https://api.github.com/users/yfarjoun/orgs","repos_url":"https://api.github.com/users/yfarjoun/repos","events_url":"https://api.github.com/users/yfarjoun/events{/privacy}","received_events_url":"https://api.github.com/users/yfarjoun/received_events","type":"User","site_admin":false},"body":"Since gvcf VariantContexts all have the <non-ref> symbolic allele, the regular callingAccumulator skips them as they are \"SYMBOLIC\" and not bi-allelic. This collector looks for a sub-context from the only genotype the VC has (assuming single sample) and sends that subcontext to the regular accumulator. \r\n\r\nA boolean argument in the CLP signals the use of the GVCF collector.\r\n\r\n@eitanbanks would you like to review this?","created_at":"2015-12-23T21:43:08Z","updated_at":"2015-12-28T04:40:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a24e9ec1b4e19a2ea9155d3e53aba9dbbffe0c3","assignee":{"login":"eitanbanks","id":2751498,"avatar_url":"https://avatars.githubusercontent.com/u/2751498?v=3","gravatar_id":"","url":"https://api.github.com/users/eitanbanks","html_url":"https://github.com/eitanbanks","followers_url":"https://api.github.com/users/eitanbanks/followers","following_url":"https://api.github.com/users/eitanbanks/following{/other_user}","gists_url":"https://api.github.com/users/eitanbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/eitanbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eitanbanks/subscriptions","organizations_url":"https://api.github.com/users/eitanbanks/orgs","repos_url":"https://api.github.com/users/eitanbanks/repos","events_url":"https://api.github.com/users/eitanbanks/events{/privacy}","received_events_url":"https://api.github.com/users/eitanbanks/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/picard/pulls/368/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/picard/pulls/368/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/picard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/picard/issues/368/comments","statuses_url":"https://api.github.com/repos/broadinstitute/picard/statuses/2fcee517dfa40ae86d61d16c145419133742adba","head":{"label":"broadinstitute:yf_gvcf_metrics","ref":"yf_gvcf_metrics","sha":"2fcee517dfa40ae86d61d16c145419133742adba","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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":18225913,"name":"picard","full_name":"broadinstitute/picard","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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},"private":false,"html_url":"https://github.com/broadinstitute/picard","description":"A set of tools (in Java) for working with next generation sequencing data in the BAM (http://samtools.github.io/hts-specs) format.","fork":false,"url":"https://api.github.com/repos/broadinstitute/picard","forks_url":"https://api.github.com/repos/broadinstitute/picard/forks","keys_url":"https://api.github.com/repos/broadinstitute/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/picard/teams","hooks_url":"https://api.github.com/repos/broadinstitute/picard/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/picard/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/picard/events","assignees_url":"https://api.github.com/repos/broadinstitute/picard/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/picard/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/picard/tags","blobs_url":"https://api.github.com/repos/broadinstitute/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/picard/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/picard/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/picard/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/picard/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/picard/subscription","commits_url":"https://api.github.com/repos/broadinstitute/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/picard/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/picard/merges","archive_url":"https://api.github.com/repos/broadinstitute/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/picard/downloads","issues_url":"https://api.github.com/repos/broadinstitute/picard/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/picard/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/picard/releases{/id}","created_at":"2014-03-28T20:43:35Z","updated_at":"2015-12-18T13:19:44Z","pushed_at":"2015-12-27T04:15:00Z","git_url":"git://github.com/broadinstitute/picard.git","ssh_url":"git@github.com:broadinstitute/picard.git","clone_url":"https://github.com/broadinstitute/picard.git","svn_url":"https://github.com/broadinstitute/picard","homepage":"http://broadinstitute.github.io/picard/","size":56812,"stargazers_count":139,"watchers_count":139,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":94,"mirror_url":null,"open_issues_count":54,"forks":94,"open_issues":54,"watchers":139,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"688c3136833664b42bd00b7fe7918b4c478e68fa","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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":18225913,"name":"picard","full_name":"broadinstitute/picard","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","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},"private":false,"html_url":"https://github.com/broadinstitute/picard","description":"A set of tools (in Java) for working with next generation sequencing data in the BAM (http://samtools.github.io/hts-specs) format.","fork":false,"url":"https://api.github.com/repos/broadinstitute/picard","forks_url":"https://api.github.com/repos/broadinstitute/picard/forks","keys_url":"https://api.github.com/repos/broadinstitute/picard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/picard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/picard/teams","hooks_url":"https://api.github.com/repos/broadinstitute/picard/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/picard/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/picard/events","assignees_url":"https://api.github.com/repos/broadinstitute/picard/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/picard/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/picard/tags","blobs_url":"https://api.github.com/repos/broadinstitute/picard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/picard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/picard/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/picard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/picard/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/picard/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/picard/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/picard/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/picard/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/picard/subscription","commits_url":"https://api.github.com/repos/broadinstitute/picard/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/picard/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/picard/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/picard/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/picard/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/picard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/picard/merges","archive_url":"https://api.github.com/repos/broadinstitute/picard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/picard/downloads","issues_url":"https://api.github.com/repos/broadinstitute/picard/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/picard/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/picard/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/picard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/picard/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/picard/releases{/id}","created_at":"2014-03-28T20:43:35Z","updated_at":"2015-12-18T13:19:44Z","pushed_at":"2015-12-27T04:15:00Z","git_url":"git://github.com/broadinstitute/picard.git","ssh_url":"git@github.com:broadinstitute/picard.git","clone_url":"https://github.com/broadinstitute/picard.git","svn_url":"https://github.com/broadinstitute/picard","homepage":"http://broadinstitute.github.io/picard/","size":56812,"stargazers_count":139,"watchers_count":139,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":94,"mirror_url":null,"open_issues_count":54,"forks":94,"open_issues":54,"watchers":139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/368"},"html":{"href":"https://github.com/broadinstitute/picard/pull/368"},"issue":{"href":"https://api.github.com/repos/broadinstitute/picard/issues/368"},"comments":{"href":"https://api.github.com/repos/broadinstitute/picard/issues/368/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/368/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/368/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/picard/statuses/2fcee517dfa40ae86d61d16c145419133742adba"}}}}