Link Search Menu Expand Document


PharmCAT is available in a Docker container.


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


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

Running the VCF preprocessor

Your VCF files needs to comply with PharmCAT’s requirements. PharmCAT has a VCF preprocessor that will handle much of this for you. Please consult the preprocessor documention for details.

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

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

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ./ --input_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 pharmcat_ready_vcf.SAMPLE1.vcf. You can then run this through PharmCAT with:

# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat ./pharmcat -vcf data/pharmcat_ready_vcf.SAMPLE1.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)