{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/picard/pulls/comments/54791946","id":54791946,"diff_hunk":"@@ -101,6 +101,66 @@ public void testMetricsFromWGS(final File input, final File outfile, final Strin\n         }\n     }\n \n+    @Test\n+    public void testOnePos() throws IOException {\n+        final File input = new File(TEST_DIR, \"forMetrics.sam\");\n+        final File outfile = File.createTempFile(\"test\", \".wgs_metrics\");\n+        final File ref = new File(TEST_DIR, \"merger.fasta\");\n+        final File intervals = new File(TEST_DIR, \"onePos.interval_list\");\n+        final int sampleSize = 1000;\n+        outfile.deleteOnExit();\n+        final String[] args = new String[] {\n+                \"INPUT=\"  + input.getAbsolutePath(),\n+                \"OUTPUT=\" + outfile.getAbsolutePath(),\n+                \"REFERENCE_SEQUENCE=\" + ref.getAbsolutePath(),\n+                \"INTERVALS=\" + intervals.getAbsolutePath(),\n+                \"SAMPLE_SIZE=\" + sampleSize\n+        };\n+        Assert.assertEquals(runPicardCommandLine(args), 0);\n+\n+        final MetricsFile<CollectWgsMetrics.WgsMetrics, Comparable<?>> output = new MetricsFile<CollectWgsMetrics.WgsMetrics, Comparable<?>>();\n+        output.read(new FileReader(outfile));\n+\n+        for (final CollectWgsMetrics.WgsMetrics metrics : output.getMetrics()) {\n+            Assert.assertEquals(metrics.GENOME_TERRITORY, 1);\n+            Assert.assertEquals(metrics.MEAN_COVERAGE, 3.0);\n+            Assert.assertEquals(metrics.PCT_EXC_MAPQ, 0.272727); // 3 of 11\n+            Assert.assertEquals(metrics.PCT_EXC_DUPE, 0.181818); // 2 of 11\n+            Assert.assertEquals(metrics.PCT_EXC_UNPAIRED, 0.090909); // 1 of 9\n+            Assert.assertEquals(metrics.PCT_EXC_BASEQ, 0.090909); // 1 of 9\n+            Assert.assertEquals(metrics.HET_SNP_SENSITIVITY, 0.34655, .02);\n+        }\n+    }\n+\n+    @Test\n+    public void testContiguousIntervals() throws IOException {","path":"src/tests/java/picard/analysis/CollectWgsMetricsTest.java","position":36,"original_position":36,"commit_id":"e0c44561ee9baaacba3a3407179007dc5ef58d0d","original_commit_id":"e0c44561ee9baaacba3a3407179007dc5ef58d0d","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":"could you add a test that has two close loci and one far away in the INTERVAL? I think the code will currently fail on that test.","created_at":"2016-03-02T21:11:36Z","updated_at":"2016-03-02T21:11:36Z","html_url":"https://github.com/broadinstitute/picard/pull/470#discussion_r54791946","pull_request_url":"https://api.github.com/repos/broadinstitute/picard/pulls/470","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/comments/54791946"},"html":{"href":"https://github.com/broadinstitute/picard/pull/470#discussion_r54791946"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/470"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/picard/pulls/470","id":61305741,"html_url":"https://github.com/broadinstitute/picard/pull/470","diff_url":"https://github.com/broadinstitute/picard/pull/470.diff","patch_url":"https://github.com/broadinstitute/picard/pull/470.patch","issue_url":"https://api.github.com/repos/broadinstitute/picard/issues/470","number":470,"state":"open","locked":false,"title":"Moves CollectWgsMetricsFromSampledSites functionality and tests to Co…","user":{"login":"meganshand","id":13020550,"avatar_url":"https://avatars.githubusercontent.com/u/13020550?v=3","gravatar_id":"","url":"https://api.github.com/users/meganshand","html_url":"https://github.com/meganshand","followers_url":"https://api.github.com/users/meganshand/followers","following_url":"https://api.github.com/users/meganshand/following{/other_user}","gists_url":"https://api.github.com/users/meganshand/gists{/gist_id}","starred_url":"https://api.github.com/users/meganshand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meganshand/subscriptions","organizations_url":"https://api.github.com/users/meganshand/orgs","repos_url":"https://api.github.com/users/meganshand/repos","events_url":"https://api.github.com/users/meganshand/events{/privacy}","received_events_url":"https://api.github.com/users/meganshand/received_events","type":"User","site_admin":false},"body":"…llectWgsMetrics\r\n","created_at":"2016-03-01T20:48:26Z","updated_at":"2016-03-02T21:11:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b1fde89f546908ef37595016982549904e3317d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/picard/pulls/470/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/picard/pulls/470/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/picard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/picard/issues/470/comments","statuses_url":"https://api.github.com/repos/broadinstitute/picard/statuses/e0c44561ee9baaacba3a3407179007dc5ef58d0d","head":{"label":"broadinstitute:ms_wgsIntervalList","ref":"ms_wgsIntervalList","sha":"e0c44561ee9baaacba3a3407179007dc5ef58d0d","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 command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.","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}","deployments_url":"https://api.github.com/repos/broadinstitute/picard/deployments","created_at":"2014-03-28T20:43:35Z","updated_at":"2016-03-01T01:24:12Z","pushed_at":"2016-03-02T20:32:39Z","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":58553,"stargazers_count":153,"watchers_count":153,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":108,"mirror_url":null,"open_issues_count":65,"forks":108,"open_issues":65,"watchers":153,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"7b1e008f999936f158a339542cc9b0a1a0a6a5f4","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 command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.","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}","deployments_url":"https://api.github.com/repos/broadinstitute/picard/deployments","created_at":"2014-03-28T20:43:35Z","updated_at":"2016-03-01T01:24:12Z","pushed_at":"2016-03-02T20:32:39Z","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":58553,"stargazers_count":153,"watchers_count":153,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":108,"mirror_url":null,"open_issues_count":65,"forks":108,"open_issues":65,"watchers":153,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/470"},"html":{"href":"https://github.com/broadinstitute/picard/pull/470"},"issue":{"href":"https://api.github.com/repos/broadinstitute/picard/issues/470"},"comments":{"href":"https://api.github.com/repos/broadinstitute/picard/issues/470/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/470/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/picard/pulls/470/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/picard/statuses/e0c44561ee9baaacba3a3407179007dc5ef58d0d"}}}}