Using PharmCAT
Table of contents
Quick Start
The quickest and easiest way to get started with PharmCAT is through Docker.
Once you have Docker installed, you can get PharmCAT from Docker Hub:
# docker pull pgkb/pharmcat
Run PharmCAT Pipeline
You will need a VCF file to run PharmCAT. Download our sample VCF and save it as sample.vcf
. Assuming you have sample.vcf
in /path/to/data
, you can run the PharmCAT pipeline with:
# docker run --rm -v /path/to/data:/pharmcat/data pgkb/pharmcat pharmcat_pipeline data/sample.vcf
docker run
: The base Docker command--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 thedata
subdirectory.pgkb/pharmcat
: The name of the PharmCAT imagepharmcat_pipeline
: The PharmCAT pipeline scriptdata/sample.vcf
: The VCF file to process
And you should see the following output:
PharmCAT version: 2.15.5
Processing data/sample.vcf ...
Running PharmCAT...
Checking files...
* Found 1 VCF file
Saving named allele matcher JSON results to /pharmcat/data/sample.match.json
Saving phenotyper JSON results to /pharmcat/data/sample.phenotype.json
Saving reporter HTML results to /pharmcat/data/sample.report.html
Done.
Inputs
Before continuing with PharmCAT, please take the time to understand PharmCAT's input requirements. PharmCAT accepts two types of files: VCF files and "outside call" files.
VCF files contain genetic sequence variation and must meet PharmCAT's VCF Requirements. This is used by PharmCAT to identify pharmacogenomic (PGx) genotypes and infer haplotypes, typically called star alleles.
There are some genes, such as CYP2D6, HLA-A and HLA-B that PharmCAT cannot call. To get PharmCAT to generate guideline recommendations for these genes, you will need to provide the diplotype calls directly to PharmCAT using an Outside Call file (so named because the call was made outside PharmCAT). You might also use this if you want to get guideline recommendations without using PharmCAT to call diplotypes from VCF data. Consult the documentation for details.
- Details on Calling CYP2D6
- Details on Calling HLA
Docker
The quickest and easiest way to get started with PharmCAT is through Docker.
See PharmCAT in Docker for a more complete walk-through on how to do so.
PharmCAT Pipeline
The easiest way to run PharmCAT is to use the pharmcat_pipeline
script.
Running the PharmCAT Pipeline has all the details on using the script and plenty of examples.
Note: the pharmcat_pipeline
script caters for simplicity and ease of use. If you really want to take advantage of PharmCAT, take a look at the Advanced Usage section below.
Advanced Usage
The PharmCAT pipeline is composed of two components: the VCF Preprocessor and the core PharmCAT tool. You can run either of these components separately. In fact, the core PharmCAT tool is itself composed of multiple modules that can be run independently as well.
For details on using these components, see:
If you do not wish to use Docker, or you need to set it up in your own environment, then take a look at Advanced PharmCAT Setup.
Video Tutorial
Prefer video tutorials? We have a hands-on video tutorial on how to run PharmCAT on YouTube. It will walk you through setting up and running PharmCAT.
Note that this tutorial does not cover the pharmcat_pipeline
script, but using the VCF preprocessor and core PharmCAT tool directly.