{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/54156938","id":54156938,"diff_hunk":"@@ -19,70 +20,75 @@ public String getTestedClassName() {\n     }\n \n     @Test(dataProvider=\"testingData\")\n-    public void testFileToFile(String fileIn, String extOut) throws Exception {\n-        String samFile= fileIn;\n-        final File outFile = BaseTest.createTempFile(samFile + \".\", extOut);\n-        File ORIG_BAM = new File(TEST_DATA_DIR, samFile);\n-        final String[] args = new String[]{\n-                \"--input\" , ORIG_BAM.getAbsolutePath(),\n-                \"--output\", outFile.getAbsolutePath()\n-        };\n-        Assert.assertEquals(runCommandLine(args), null);\n-        SamAssertionUtils.assertSamsEqual(outFile, ORIG_BAM);\n-    }\n-\n-    @Test(dataProvider=\"testingDataCRAM\")\n-    public void testFileToFileCRAM(String fileIn, String extOut, String reference) throws Exception {\n+    public void testFileToFile(String fileIn, String extOut, String reference) throws Exception {\n         String samFile= fileIn;\n         final File outFile = File.createTempFile(samFile + \".\", extOut);\n         outFile.deleteOnExit();\n         final File ORIG_BAM = new File(TEST_DATA_DIR, samFile);\n-        final File refFile = new File(TEST_DATA_DIR, reference);\n-        final String[] args = new String[]{\n-                \"--input\" , ORIG_BAM.getAbsolutePath(),\n-                \"--output\", outFile.getAbsolutePath(),\n-                \"-R\", refFile.getAbsolutePath()\n+        final String[] args;\n+        if (reference == null) {\n+            args = new String[]{\n+                    \"--input\", ORIG_BAM.getAbsolutePath(),\n+                    \"--output\", outFile.getAbsolutePath(),\n+            };\n+        } else {\n+            final File refFile = new File(TEST_DATA_DIR, reference);\n+            args = new String[]{\n+                    \"--input\", ORIG_BAM.getAbsolutePath(),\n+                    \"--output\", outFile.getAbsolutePath(),\n+                    \"-R\", refFile.getAbsolutePath()\n+            };\n         };\n+\n         runCommandLine(args);\n \n-        //TODO: Make this comparison non-lenient in all cases: https://github.com/broadinstitute/gatk/issues/1087\n-        if (extOut.equals(\".cram\")){\n-            SamAssertionUtils.assertSamsEqualLenient(outFile, ORIG_BAM, refFile);\n+        if (fileIn.endsWith(CramIO.CRAM_FILE_EXTENSION) || extOut.equals(CramIO.CRAM_FILE_EXTENSION)) {\n+            final File refFile = new File(TEST_DATA_DIR, reference);\n+            if (!fileIn.endsWith(CramIO.CRAM_FILE_EXTENSION)) {\n+                // TODO: We still need lenient comparison due to https://github.com/samtools/htsjdk/issues/455\n+                // (cram->bam conversion strips out NM/MD tags)\n+                SamAssertionUtils.assertSamsEqualLenient(ORIG_BAM, outFile, refFile);\n+            }\n+            else {\n+                SamAssertionUtils.assertSamsEqual(ORIG_BAM, outFile, refFile);","path":"src/test/java/org/broadinstitute/hellbender/tools/PrintReadsIntegrationTest.java","position":63,"original_position":63,"commit_id":"42af603c59ab818734500a5d25f480615e5621cc","original_commit_id":"42af603c59ab818734500a5d25f480615e5621cc","user":{"login":"droazen","id":798637,"avatar_url":"https://avatars.githubusercontent.com/u/798637?v=3","gravatar_id":"","url":"https://api.github.com/users/droazen","html_url":"https://github.com/droazen","followers_url":"https://api.github.com/users/droazen/followers","following_url":"https://api.github.com/users/droazen/following{/other_user}","gists_url":"https://api.github.com/users/droazen/gists{/gist_id}","starred_url":"https://api.github.com/users/droazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droazen/subscriptions","organizations_url":"https://api.github.com/users/droazen/orgs","repos_url":"https://api.github.com/users/droazen/repos","events_url":"https://api.github.com/users/droazen/events{/privacy}","received_events_url":"https://api.github.com/users/droazen/received_events","type":"User","site_admin":false},"body":"`actual, expected`","created_at":"2016-02-25T20:14:47Z","updated_at":"2016-02-25T20:14:47Z","html_url":"https://github.com/broadinstitute/gatk/pull/1488#discussion_r54156938","pull_request_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/54156938"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/1488#discussion_r54156938"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488","id":59380686,"html_url":"https://github.com/broadinstitute/gatk/pull/1488","diff_url":"https://github.com/broadinstitute/gatk/pull/1488.diff","patch_url":"https://github.com/broadinstitute/gatk/pull/1488.patch","issue_url":"https://api.github.com/repos/broadinstitute/gatk/issues/1488","number":1488,"state":"open","locked":false,"title":"Write CRAM on Spark.","user":{"login":"cmnbroad","id":10062863,"avatar_url":"https://avatars.githubusercontent.com/u/10062863?v=3","gravatar_id":"","url":"https://api.github.com/users/cmnbroad","html_url":"https://github.com/cmnbroad","followers_url":"https://api.github.com/users/cmnbroad/followers","following_url":"https://api.github.com/users/cmnbroad/following{/other_user}","gists_url":"https://api.github.com/users/cmnbroad/gists{/gist_id}","starred_url":"https://api.github.com/users/cmnbroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmnbroad/subscriptions","organizations_url":"https://api.github.com/users/cmnbroad/orgs","repos_url":"https://api.github.com/users/cmnbroad/repos","events_url":"https://api.github.com/users/cmnbroad/events{/privacy}","received_events_url":"https://api.github.com/users/cmnbroad/received_events","type":"User","site_admin":false},"body":"https://github.com/broadinstitute/gatk/issues/1270. Depends on https://github.com/broadinstitute/gatk/pull/1469, which should be reviewed first and then I can remove the first commit from this branch.","created_at":"2016-02-15T15:49:34Z","updated_at":"2016-02-25T20:14:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6418d479ab2ff6400d5c8810f4e9bb474d24105","assignee":{"login":"droazen","id":798637,"avatar_url":"https://avatars.githubusercontent.com/u/798637?v=3","gravatar_id":"","url":"https://api.github.com/users/droazen","html_url":"https://github.com/droazen","followers_url":"https://api.github.com/users/droazen/followers","following_url":"https://api.github.com/users/droazen/following{/other_user}","gists_url":"https://api.github.com/users/droazen/gists{/gist_id}","starred_url":"https://api.github.com/users/droazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droazen/subscriptions","organizations_url":"https://api.github.com/users/droazen/orgs","repos_url":"https://api.github.com/users/droazen/repos","events_url":"https://api.github.com/users/droazen/events{/privacy}","received_events_url":"https://api.github.com/users/droazen/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/issues/1488/comments","statuses_url":"https://api.github.com/repos/broadinstitute/gatk/statuses/42af603c59ab818734500a5d25f480615e5621cc","head":{"label":"broadinstitute:cn_spark_write_cram","ref":"cn_spark_write_cram","sha":"42af603c59ab818734500a5d25f480615e5621cc","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":27452807,"name":"gatk","full_name":"broadinstitute/gatk","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/gatk","description":"GATK4 development","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":"2016-02-10T19:27:33Z","pushed_at":"2016-02-25T19:49:39Z","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":"","size":59361,"stargazers_count":48,"watchers_count":48,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":298,"forks":19,"open_issues":298,"watchers":48,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"b9b03f2e5ef41988ce6ca1e018764d81e154f33f","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":27452807,"name":"gatk","full_name":"broadinstitute/gatk","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/gatk","description":"GATK4 development","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":"2016-02-10T19:27:33Z","pushed_at":"2016-02-25T19:49:39Z","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":"","size":59361,"stargazers_count":48,"watchers_count":48,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":298,"forks":19,"open_issues":298,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/1488"},"issue":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/1488"},"comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/1488/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1488/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/gatk/statuses/42af603c59ab818734500a5d25f480615e5621cc"}}}}