On 10 Sep 2015, at 21:54, Terry Casstevens <[email protected]> wrote:
> If you use bgzip to zip an already gzipped file, does that result in a
> correctly bgzipped file?
>
> Or should you first ungzip the file and then bgzip?
Your tools are expecting a file with a single layer of bgzipping, so as Peter
noted you will need to undo the existing plain compression and then re-bgzip
it. This can be done without an uncompressed temporary file with
mv foo.vcf.gz foo.vcf.plaingz
gzcat foo.vcf.plaingz | bgzip > foo.vcf.gz
and the final foo.vcf.gz will be identical to what you'd get with "gunzip
foo.vcf.gz; bgzip foo.vcf" [1].
John
[1] Format nerdery: because bgzip doesn't ever put any filenames in the GZIP
header.
--
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.
------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help