Skip to content
Advertisement

bgzip all VCF files in a directory?

So I’ve been trying to bgzip around 100 VCF files in parallel, but although the jobs are submitted and files get created there’s definitely something wrong.

So far I’ve been trying:

$for file in *.vcf 

> do

> bsub /foo/bar/bgzip $file

>> $file.gz 

What is the correct way to do this?

Thanks in advance!

Advertisement

Answer

If, as my websearches suggest, bgzip works the same way as gzip, you don’t specify an output file:

for f in *.vcf; do
   bsub bgzip "$f"
done

You should also double-quote variables in case your filenames have spaces in them.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement