-
Notifications
You must be signed in to change notification settings - Fork 40
Building PharmCAT
This page is meant for people interested in developing PharmCAT. If you only want to use PharmCAT, go to the PharmCAT website.
Mac users: you may have an older version of make. If you have Homebrew installed, you can update make with:
# brew install make
To build the PharmCAT jar that contains all dependencies:
# ./gradlew shadowJar
This will put a new JAR file in the build/libs
directory with the current version number in the filename.
Alternatively, to build a local PharmCAT Docker image, run the following under the main PharmCAT folder
# make docker
⚠️ PharmCAT docker images support CPU with ARM or AMD architectures from v2.12.0 forward. If you use a PharmCAT docker image of previous releases and have a laptop with an Apple Silicon chip or any CPU with ARM architecture, you will need to set thePHARMCAT_DOCKER_PLATFORM
environment variable tolinux/arm64
.Many Python packages have yet to adopt the ARM CPU architecture. For example, you will run into varying errors when building a docker image with the python wheel package. See this page for details and possible solutions.
To test PharmCAT core:
# ./gradle test
To test PharmCAT against autogenerated VCF input:
# make allVcfTests
# make allMissingVcfTests
These tests will store metadata on the test results. While the number of failed allVcfTests
should never go up, it's acceptable for the number of failed allMissingVcfTests
as long as the relative increase in failures matches the relative increase in the number of tests.
These tests will also zip up all test data and results for analysis.
- Generate allele definition overlap metadata (Binglan's script)
- Generate autogenerated VCFs (Scott's script)
- Split autogenerated VCFs into "should pass" and "should fail"
- Test autogenerated VCFs
This step requires Docker.
To update the data PharmCAT relies on:
# make docker
# make updateData
The make docker
is only necessary to pick up any updates to the preprocessor. This step can be skipped if there are no changes to the preprocessor.
After updating the data, run all tests.
If there are no errors, commit all updated files (this will potentially include updates to test metadata). Make sure to include the updated data versions in the commit message.
Also upload the zipped test data to Box.