On 14 May 2015, at 22:02, Heng Li <l...@me.com> wrote:
> A historical background. Terminating at EOF was intended initially. The idea 
> was to allow a BAM footer for extra information, such as the index. 
> Nonetheless, we have not gone much further with this idea.

Emails of the time [1] suggest it was floated as an idea fairly early rather 
than "intended initially".  I continue to think [2] it would have been a 
mistake to signal EOF solely at the BGZF "transport layer" and not at the BAM 
format layer (e.g. with a terminator alignment record with block_size=0).

As you say, this idea never gained much traction.  Appending does seem to be 
gaining traction.  While it would be possible to remove soon-to-be-nonfinal EOF 
blocks by concatenating in a fancy way that truncated 28 bytes from the first 
file when it has an EOF block, this is incompatible with using the ordinary 
cat(1) command or opening files with "a" / O_APPEND -- or with some easy piping 
-- so can't be relied on.

We do have a program here to remove EOF blocks to facilitate catting, and could 
probably add such a tool to htslib or so.

    John


[1] http://sourceforge.net/p/samtools/mailman/message/23665824/
[2] http://sourceforge.net/p/samtools/mailman/message/23666383/

-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to