{"action":"created","issue":{"url":"https://api.github.com/repos/samtools/hts-specs/issues/135","repository_url":"https://api.github.com/repos/samtools/hts-specs","labels_url":"https://api.github.com/repos/samtools/hts-specs/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/samtools/hts-specs/issues/135/comments","events_url":"https://api.github.com/repos/samtools/hts-specs/issues/135/events","html_url":"https://github.com/samtools/hts-specs/issues/135","id":139956224,"number":135,"title":"SAM and zero length Z fields","user":{"login":"jkbonfield","id":2210525,"avatar_url":"https://avatars.githubusercontent.com/u/2210525?v=3","gravatar_id":"","url":"https://api.github.com/users/jkbonfield","html_url":"https://github.com/jkbonfield","followers_url":"https://api.github.com/users/jkbonfield/followers","following_url":"https://api.github.com/users/jkbonfield/following{/other_user}","gists_url":"https://api.github.com/users/jkbonfield/gists{/gist_id}","starred_url":"https://api.github.com/users/jkbonfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkbonfield/subscriptions","organizations_url":"https://api.github.com/users/jkbonfield/orgs","repos_url":"https://api.github.com/users/jkbonfield/repos","events_url":"https://api.github.com/users/jkbonfield/events{/privacy}","received_events_url":"https://api.github.com/users/jkbonfield/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/samtools/hts-specs/labels/sam","name":"sam","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/samtools/hts-specs/milestones/2","html_url":"https://github.com/samtools/hts-specs/milestones/June%202016%20meeting","labels_url":"https://api.github.com/repos/samtools/hts-specs/milestones/2/labels","id":1787117,"number":2,"title":"June 2016 meeting","description":"Agenda items for the June 2016 GA4GH File Formats telephone meeting.","creator":{"login":"jmarshall","id":70921,"avatar_url":"https://avatars.githubusercontent.com/u/70921?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarshall","html_url":"https://github.com/jmarshall","followers_url":"https://api.github.com/users/jmarshall/followers","following_url":"https://api.github.com/users/jmarshall/following{/other_user}","gists_url":"https://api.github.com/users/jmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarshall/subscriptions","organizations_url":"https://api.github.com/users/jmarshall/orgs","repos_url":"https://api.github.com/users/jmarshall/repos","events_url":"https://api.github.com/users/jmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/jmarshall/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":0,"state":"open","created_at":"2016-05-25T10:50:42Z","updated_at":"2016-06-06T13:46:53Z","due_on":"2016-06-09T23:00:00Z","closed_at":null},"comments":4,"created_at":"2016-03-10T17:19:11Z","updated_at":"2016-06-17T13:47:41Z","closed_at":null,"body":"We occasionally find a tag like ```MC:Z:``` with no string after it, ie the zero length string. \r\nThis tag in BAM can be read by both samtools and picard, but in SAM both tools emit an error.\r\n\r\nThe SAM specification states Z has to take the form ```[ !-~]+```, ie 1 or more characters, so the above MC tag is illegal.\r\n\r\nHowever I can't really see any justification for it except accidental over specification. (It's always been this way though.)\r\n\r\nIs this something we care about improving, or just accept that the tag was bugged and indeed it shouldn't be possible to specify empty strings."},"comment":{"url":"https://api.github.com/repos/samtools/hts-specs/issues/comments/226773035","html_url":"https://github.com/samtools/hts-specs/issues/135#issuecomment-226773035","issue_url":"https://api.github.com/repos/samtools/hts-specs/issues/135","id":226773035,"user":{"login":"jmarshall","id":70921,"avatar_url":"https://avatars.githubusercontent.com/u/70921?v=3","gravatar_id":"","url":"https://api.github.com/users/jmarshall","html_url":"https://github.com/jmarshall","followers_url":"https://api.github.com/users/jmarshall/followers","following_url":"https://api.github.com/users/jmarshall/following{/other_user}","gists_url":"https://api.github.com/users/jmarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/jmarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmarshall/subscriptions","organizations_url":"https://api.github.com/users/jmarshall/orgs","repos_url":"https://api.github.com/users/jmarshall/repos","events_url":"https://api.github.com/users/jmarshall/events{/privacy}","received_events_url":"https://api.github.com/users/jmarshall/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T13:47:41Z","updated_at":"2016-06-17T13:47:41Z","body":"I believe the only extant **H** was `FZ`, and it was converted to a **B**-array in a01f3f243d1e378554328db943a998478259de93.  So (1) the problem is rather moot; and (2) I think it's reasonable to assume these things were aways in practice even in length, and nobody ever parsed one by getting to the end, realising they only have half a byte left, and going back and shifting everything by a nybble.\r\n\r\nAlso we can pretend that the footnote (_For example, a byte array [0x1a,0xe3,0x1] corresponds to a Hex string ‘1AE301’_) implies this. :smile:"}}
{"actor":{"display_login":"jmarshall"}}