Compress already compressed file with bgzip without decompressing first
1
1
Entering edit mode
22 months ago

I have a large compressed VCF that needs to be compressed with bgzip so I can run bcftools. However, it isn't compressed with bgzip and if I decompress I will go over my quota on the cluster. Is it possible to compress a file without decompressing it fully and then compressing it again?

bgzip • 511 views
ADD COMMENT
4
Entering edit mode
22 months ago
4galaxy77 2.8k

Assuming it's compressed with gzip, then zcat it to stdout which won't use up any of your disk quota and then bgzip.

zcat vcf.gz | bgzip -c > vcf.bgz
ADD COMMENT

Login before adding your answer.

Traffic: 1803 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6