{"action":"closed","issue":{"url":"https://api.github.com/repos/broadinstitute/gatk/issues/903","labels_url":"https://api.github.com/repos/broadinstitute/gatk/issues/903/labels{/name}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/issues/903/comments","events_url":"https://api.github.com/repos/broadinstitute/gatk/issues/903/events","html_url":"https://github.com/broadinstitute/gatk/issues/903","id":107063738,"number":903,"title":"Add explicit support for headerless SAMRecords to htsjdk","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},"labels":[{"url":"https://api.github.com/repos/broadinstitute/gatk/labels/HTSJDK","name":"HTSJDK","color":"fbca04"},{"url":"https://api.github.com/repos/broadinstitute/gatk/labels/PRIORITY_HIGH","name":"PRIORITY_HIGH","color":"e11d21"}],"state":"closed","locked":false,"assignee":{"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},"milestone":null,"comments":3,"created_at":"2015-09-17T20:06:24Z","updated_at":"2015-11-19T20:50:51Z","closed_at":"2015-11-19T20:50:51Z","body":"The SAMRecord class currently allows the header to be set to null (either at construction time or via `setHeader()`), but may blow up or allow itself to enter an inconsistent state when it lacks a header (eg., the reference name and reference index can get out of sync).\r\n\r\nWe should patch this class (and subclasses such as `BAMRecord`) in https://github.com/samtools/htsjdk/ to behave sensibly in all cases when a header is not present (eg., use a special missing value for reference index when the reference index cannot be looked up), and add unit tests to prove that headerless `SAMRecords` function correctly.\r\n\r\nThis is important for dataflow and spark, where we want to serialize `SAMRecords` without paying the cost of serializing a header for each record."}}