Question: how to use bgzip with tabix docker image
gravatar for genya35
17 months ago by
genya3520 wrote:

Please suggest how to run bgzip via docker image.

I've secessfully pulled: but can't figure out how to run bgzip command.


software error • 950 views
ADD COMMENTlink modified 17 months ago by Gungor Budak230 • written 17 months ago by genya3520
gravatar for Gungor Budak
17 months ago by
Gungor Budak230
Gungor Budak230 wrote:

Considering you are at your project's folder with the input files that you want to pass to bgzip, use the following command to interactively run bgzip in a Docker container interactively and mounting the current directory under /opt/ within the Docker container generate:

docker run -ti -v $PWD:/opt/ --entrypoint '/opt/samtools/bin/bgzip' mgibio/tabix:1.3.1 --help

Version: 1.3.1
Usage:   bgzip [OPTIONS] [FILE] ...
   -b, --offset INT        decompress at virtual file pointer (0-based uncompressed offset)
   -c, --stdout            write on standard output, keep original files unchanged
   -d, --decompress        decompress
   -f, --force             overwrite files without asking
   -h, --help              give this help
   -i, --index             compress and create BGZF index
   -I, --index-name FILE   name of BGZF index file [file.gz.gzi]
   -r, --reindex           (re)index compressed file
   -s, --size INT          decompress INT bytes (uncompressed size)
   -@, --threads INT       number of compression threads to use [1]

-ti is for interactive run

-v $PWD:/opt/ for mounting the current directory so you can provide input files

--entrypoint '/opt/samtools/bin/bgzip' to set bgzip as the container's entrypoint

mgibio/tabix:1.3.1 is the repo

--help is the arguments you normally would provide

For example to bgzip a VCF file:

docker run -ti -v $PWD:/opt/ --entrypoint '/opt/samtools/bin/bgzip' mgibio/tabix:1.3.1 -c -f /opt/input_vcf_file.vcf > /opt/
ADD COMMENTlink modified 17 months ago • written 17 months ago by Gungor Budak230
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1259 users visited in the last hour