vcf.gz to vcf
1
0
Entering edit mode
15 months ago
sooni ▴ 20

Hello. I want to unzip 'vcf.gz' file.

bgzip -d my.vcf.gz

In Linux, when I run the above code, I get the following error:

[bgzip] my.vcf.gz: not a compressed file -- ignored

How can I solve this problem?

VCF • 1.3k views
ADD COMMENT
2
Entering edit mode
15 months ago
Mark ★ 1.6k

As the error says, the file is not compressed. In linux the file extension is essentially optional. The file could be named my.vcf.txt yet be compressed.

Use the file command to get file type in linux:

% echo test > my.vcf.gz
% file my.vcf.gz
my.vcf.gz: ASCII text

Let's fix this by changing the extension:

% mv my.vcf.gz my.vcf
% gunzip my.vcf
% file my.vcf.gz
my.vcf.gz: gzip compressed data, was "my.vcf"...

However or whatever generated that vcf file did not output a compressed vcf.gz file.

ADD COMMENT
1
Entering edit mode

Nice solution! Normally I run "head" on it which ruins my Putty instance.

ADD REPLY
0
Entering edit mode

!! The same happens to me when I accidentally do this! I never found a way to recover the instance. I think There's some escaped characters that terminals the garbled strings returning the instance to normal characters. Similar to output colors to the terminal eg \033[0m to end color.

ADD REPLY

Login before adding your answer.

Traffic: 1903 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