On 7 Jul 2017, at 15:39, Gerben Menschaert <gerben.menscha...@gmail.com> wrote: > I’m testing interoperability with existing software tools using our proBAM > format. > > Within the format we added an novel header line, holding information on the > annotation used: > @GA AS:ENSEMBL VN:85 > > The SAM format specification document > (http://samtools.github.io/hts-specs/SAMv1.pdf) mentions that this is allowed: > > ###### (from section 1.3) > Each header line begins with the character ‘@’ followed by one of the > two-letter header record type codes defined in this section. In the header, > each line is TAB-delimited and, apart from @CO lines, each data field follows > a format ‘TAG:VALUE’ where TAG is a two-character string that defines the > format and content of VALUE. Thus header lines match > /^@[A-Z][A-Z](\t[A-Za-z][A-Za-z0-9]:[ -~]+)+$/ or /^@CO\t.*/. > ######
The two-letter header record type codes defined in §1.3 are HD, SQ, RG, PG, and CO. So in fact the first sentence you quoted expressly forbids inventing other header record types. This was clarified a couple of years ago in response to the samtools-devel thread "User-defined record type in SAM header" (see https://sourceforge.net/p/samtools/mailman/message/34308101/ ). Perhaps we should have spelt it out in the regex too, as Dan suggested at the time :-) That mailing list thread also contains some of the reasons why new headers can't just be added without implications for the various implementations, as you've seen. As also noted in that thread, it would be possible to add new header record types on a case-by-case basis but after all these years the bar is fairly high. So it would be important to understand exactly what you are trying to express, and whether it can be expressed in some way using the already-existing headers. John ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help