Skip to main content Link Search Menu Expand Document (external link)

PharmCAT in Docker

PharmCAT is available in a Docker container.

Setup

If you are not familiar with Docker, this overview is a good starting point.

You must have Docker installed to use PharmCAT via Docker.

Then you can get PharmCAT from Docker Hub:

# docker pull pgkb/pharmcat

Usage

You will need to make your data accessible to the Docker container. There are many options, of which a volume mount is probably the best.

However, this tutorial will use bind mounts.

General usage:

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat <xxx>
--rm
Cleans up the container automatically when you're done with it
-v
Bind mounts /path/to/data on your machine to /pharmcat/data in the Docker image. This will make the data available under the data subdirectory.
<xxx>
Command to run

If you run ls, it will list the contents of the /pharmcat directory:

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ls
pharmcat_vcf_preprocessor.py
data
pharmcat
pharmcat.jar
pharmcat_positions.uniallelic.vcf.bgz
pharmcat_positions.uniallelic.vcf.bgz.csi
pharmcat_positions.vcf
pharmcat_positions.vcf.bgz
pharmcat_positions.vcf.bgz.csi
preprocessor
reference.fna.bgz
reference.fna.bgz.fai
reference.fna.bgz.gzi
vcf_preprocess_exceptions.py
vcf_preprocess_utilities.py

Running the VCF preprocessor

Your VCF files needs to comply with PharmCAT's requirements. PharmCAT's VCF preprocessor will handle much of this for you.

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ./pharmcat_vcf_preprocessor.py

If you have a file /path/to/data/sample.vcf, you would use:

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ./pharmcat_vcf_preprocessor.py -vcf data/sample.vcf

Note: the GRCh38 reference is included in the Docker image, so you do not need to provide it unless you have special reference requirements.

Running PharmCAT

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ./pharmcat

After running the file /path/to/data/sample.vcf through the preprocessor, assuming the sample ID was "SAMPLE1", you would have gotten a file called SAMPLE1.preprocessed.vcf. You can then run this through PharmCAT with:

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ./pharmcat -vcf data/SAMPLE1.preprocessed.vcf

The Docker image includes the pharmcat script, which is just a wrapper around the call to Java. For details on using PharmCAT, please see the Running PharmCAT.


PharmCAT is managed at Stanford University & University of Pennsylvania (NHGRI U24HG010862).