Compress already compressed file with bgzip without decompressing first
1
1
Entering edit mode
2.4 years 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 • 775 views
ADD COMMENT
4
Entering edit mode
2.4 years ago
4galaxy77 2.9k

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: 1629 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