{"action":"created","comment":{"url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/comments/48684805","id":48684805,"diff_hunk":"@@ -0,0 +1,40 @@\n+// Copyright (c) 2015 Regents of the University of California\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the \"Software\"), to\n+// deal in the Software without restriction, including without limitation the\n+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n+// sell copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n+// IN THE SOFTWARE.\n+\n+package htsjdk.samtools;\n+\n+import htsjdk.samtools.seekablestream.SeekableStream;\n+\n+/**\n+   NOTE!!!!\n+   This is really smelly code!!!!\n+   \n+   This class is not public in HTSJDK. We have opened a PR\n+   to make the class public upstream. Once that is merged and\n+   a new release of HTSJDK is cut, this file should be removed.","path":"src/main/java/htsjdk/samtools/PublicDiskBasedBAMFileIndex.java","position":31,"original_position":31,"commit_id":"0c5b5c3fee0c75994e2e8b508e6188d96da0dbf6","original_commit_id":"0c5b5c3fee0c75994e2e8b508e6188d96da0dbf6","user":{"login":"AndreSchumacher","id":3220544,"avatar_url":"https://avatars.githubusercontent.com/u/3220544?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreSchumacher","html_url":"https://github.com/AndreSchumacher","followers_url":"https://api.github.com/users/AndreSchumacher/followers","following_url":"https://api.github.com/users/AndreSchumacher/following{/other_user}","gists_url":"https://api.github.com/users/AndreSchumacher/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreSchumacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreSchumacher/subscriptions","organizations_url":"https://api.github.com/users/AndreSchumacher/orgs","repos_url":"https://api.github.com/users/AndreSchumacher/repos","events_url":"https://api.github.com/users/AndreSchumacher/events{/privacy}","received_events_url":"https://api.github.com/users/AndreSchumacher/received_events","type":"User","site_admin":false},"body":"I suppose making this available as public would also help in resolving https://github.com/HadoopGenomics/Hadoop-BAM/issues/31.","created_at":"2016-01-02T14:05:10Z","updated_at":"2016-01-02T14:05:10Z","html_url":"https://github.com/HadoopGenomics/Hadoop-BAM/pull/44#discussion_r48684805","pull_request_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/comments/48684805"},"html":{"href":"https://github.com/HadoopGenomics/Hadoop-BAM/pull/44#discussion_r48684805"},"pull_request":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44","id":54158283,"html_url":"https://github.com/HadoopGenomics/Hadoop-BAM/pull/44","diff_url":"https://github.com/HadoopGenomics/Hadoop-BAM/pull/44.diff","patch_url":"https://github.com/HadoopGenomics/Hadoop-BAM/pull/44.patch","issue_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues/44","number":44,"state":"open","locked":false,"title":"Porting over IndexedBAMInputFormat code.","user":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=3","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"body":"Resolves #34.\r\n\r\nThere is some pretty stinky code in here due to class protection issues. Some of these issues are resolved by newer versions of HTSJDK (it seems like the 2.* stream of releases make BAMFileSpan public) or by open PRs (see https://github.com/samtools/htsjdk/pull/413).\r\n\r\nAlso, this code needs more testing. This is a port of the [Scala version from ADAM](https://github.com/bigdatagenomics/adam/blob/master/adam-core/src/main/java/org/bdgenomics/adam/io/IndexedBamInputFormat.scala), over to Java, but I haven't pulled in unit tests yet. I will try to make a pass back within the next week to get the unit tests in. In the meanwhile, please review this code.","created_at":"2015-12-18T22:41:20Z","updated_at":"2016-01-02T14:05:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"304c5565a6b890643a80c730b6ffefbf90d12a18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44/commits","review_comments_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44/comments","review_comment_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues/44/comments","statuses_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/statuses/0c5b5c3fee0c75994e2e8b508e6188d96da0dbf6","head":{"label":"fnothaft:indexed-subset","ref":"indexed-subset","sha":"0c5b5c3fee0c75994e2e8b508e6188d96da0dbf6","user":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=3","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"repo":{"id":38078626,"name":"Hadoop-BAM","full_name":"fnothaft/Hadoop-BAM","owner":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=3","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fnothaft/Hadoop-BAM","description":"Hadoop-BAM is a Java library for the manipulation of files in common bioinformatics formats using the Hadoop MapReduce framework with the Picard SAM JDK, and command line tools similar to SAMtools.","fork":true,"url":"https://api.github.com/repos/fnothaft/Hadoop-BAM","forks_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/forks","keys_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/teams","hooks_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/hooks","issue_events_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/issues/events{/number}","events_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/events","assignees_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/assignees{/user}","branches_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/branches{/branch}","tags_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/tags","blobs_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/git/refs{/sha}","trees_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/statuses/{sha}","languages_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/languages","stargazers_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/stargazers","contributors_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/contributors","subscribers_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/subscribers","subscription_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/subscription","commits_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/commits{/sha}","git_commits_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/git/commits{/sha}","comments_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/comments{/number}","issue_comment_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/issues/comments{/number}","contents_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/contents/{+path}","compare_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/merges","archive_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/downloads","issues_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/issues{/number}","pulls_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/pulls{/number}","milestones_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/milestones{/number}","notifications_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/labels{/name}","releases_url":"https://api.github.com/repos/fnothaft/Hadoop-BAM/releases{/id}","created_at":"2015-06-25T22:53:56Z","updated_at":"2015-06-25T22:53:57Z","pushed_at":"2015-12-18T22:34:57Z","git_url":"git://github.com/fnothaft/Hadoop-BAM.git","ssh_url":"git@github.com:fnothaft/Hadoop-BAM.git","clone_url":"https://github.com/fnothaft/Hadoop-BAM.git","svn_url":"https://github.com/fnothaft/Hadoop-BAM","homepage":null,"size":4274,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HadoopGenomics:master","ref":"master","sha":"c230e63413b97b08e9a563543337d1f86ba06141","user":{"login":"HadoopGenomics","id":7317514,"avatar_url":"https://avatars.githubusercontent.com/u/7317514?v=3","gravatar_id":"","url":"https://api.github.com/users/HadoopGenomics","html_url":"https://github.com/HadoopGenomics","followers_url":"https://api.github.com/users/HadoopGenomics/followers","following_url":"https://api.github.com/users/HadoopGenomics/following{/other_user}","gists_url":"https://api.github.com/users/HadoopGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/HadoopGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HadoopGenomics/subscriptions","organizations_url":"https://api.github.com/users/HadoopGenomics/orgs","repos_url":"https://api.github.com/users/HadoopGenomics/repos","events_url":"https://api.github.com/users/HadoopGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/HadoopGenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":18850164,"name":"Hadoop-BAM","full_name":"HadoopGenomics/Hadoop-BAM","owner":{"login":"HadoopGenomics","id":7317514,"avatar_url":"https://avatars.githubusercontent.com/u/7317514?v=3","gravatar_id":"","url":"https://api.github.com/users/HadoopGenomics","html_url":"https://github.com/HadoopGenomics","followers_url":"https://api.github.com/users/HadoopGenomics/followers","following_url":"https://api.github.com/users/HadoopGenomics/following{/other_user}","gists_url":"https://api.github.com/users/HadoopGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/HadoopGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HadoopGenomics/subscriptions","organizations_url":"https://api.github.com/users/HadoopGenomics/orgs","repos_url":"https://api.github.com/users/HadoopGenomics/repos","events_url":"https://api.github.com/users/HadoopGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/HadoopGenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/HadoopGenomics/Hadoop-BAM","description":"Hadoop-BAM is a Java library for the manipulation of files in common bioinformatics formats using the Hadoop MapReduce framework with the Picard SAM JDK, and command line tools similar to SAMtools.","fork":false,"url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM","forks_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/forks","keys_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/teams","hooks_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/hooks","issue_events_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues/events{/number}","events_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/events","assignees_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/assignees{/user}","branches_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/branches{/branch}","tags_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/tags","blobs_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/git/refs{/sha}","trees_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/statuses/{sha}","languages_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/languages","stargazers_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/stargazers","contributors_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/contributors","subscribers_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/subscribers","subscription_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/subscription","commits_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/commits{/sha}","git_commits_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/git/commits{/sha}","comments_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/comments{/number}","issue_comment_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues/comments{/number}","contents_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/contents/{+path}","compare_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/merges","archive_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/downloads","issues_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues{/number}","pulls_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls{/number}","milestones_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/milestones{/number}","notifications_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/labels{/name}","releases_url":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/releases{/id}","created_at":"2014-04-16T18:07:35Z","updated_at":"2015-12-23T06:55:24Z","pushed_at":"2015-12-29T20:06:10Z","git_url":"git://github.com/HadoopGenomics/Hadoop-BAM.git","ssh_url":"git@github.com:HadoopGenomics/Hadoop-BAM.git","clone_url":"https://github.com/HadoopGenomics/Hadoop-BAM.git","svn_url":"https://github.com/HadoopGenomics/Hadoop-BAM","homepage":null,"size":4315,"stargazers_count":29,"watchers_count":29,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":13,"forks":24,"open_issues":13,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44"},"html":{"href":"https://github.com/HadoopGenomics/Hadoop-BAM/pull/44"},"issue":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues/44"},"comments":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/HadoopGenomics/Hadoop-BAM/statuses/0c5b5c3fee0c75994e2e8b508e6188d96da0dbf6"}}}}