Question: how to use bgzip with tabix docker image
0
gravatar for genya35
9 months ago by
genya3510
genya3510 wrote:

Please suggest how to run bgzip via docker image.

I've secessfully pulled: https://hub.docker.com/r/mgibio/tabix/builds/ but can't figure out how to run bgzip command.

Thanks

software error • 593 views
ADD COMMENTlink modified 9 months ago by Gungor Budak230 • written 9 months ago by genya3510
3
gravatar for Gungor Budak
9 months ago by
Gungor Budak230
Ankara/Turkey
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] ...
Options:
   -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/input_vcf_file.tab.vcf.gz
ADD COMMENTlink modified 9 months ago • written 9 months ago by Gungor Budak230
Please log in to add an answer.

Help
Access

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