| 1 |
# gatk-bwamem-jni |
| 2 |
JNI code for bwa mem. |
| 3 |
|
| 4 |
This project builds dynamic libraries with a JNI API. |
| 5 |
It allows Java code to call Heng Li's bwa mem aligner. |
| 6 |
|
| 7 |
To build you'll need gmake, git, gcc, and Java 8. |
| 8 |
|
| 9 |
#### To build and install a snapshot locally: |
| 10 |
|
| 11 |
``` |
| 12 |
./gradlew install |
| 13 |
``` |
| 14 |
|
| 15 |
This will work for testing but will only include a native library for your system. |
| 16 |
|
| 17 |
#### To upload a snapshot from a Broad Institute OSX machine with both OSX and Linux binaries: |
| 18 |
``` |
| 19 |
commit your changes and push your branch to github |
| 20 |
scripts/build_both_dylib_and_so.sh |
| 21 |
./gradlew uploadArchives printVersion |
| 22 |
``` |
| 23 |
|
| 24 |
#### To upload to maven central |
| 25 |
|
| 26 |
First follow the one-time setup instruction post on the [Picard project Wiki page](https://github.com/broadinstitute/picard/wiki/How-to-release-Picard#one-time-setup-tasks). You can ignore the last part about setting up sudo rights on picard02. |
| 27 |
|
| 28 |
Then do the following: |
| 29 |
|
| 30 |
``` |
| 31 |
commit your changes and push your branch to github |
| 32 |
git tag -a -s <version> |
| 33 |
./gradlew clean |
| 34 |
scripts/build_both_dylib_and_so.sh |
| 35 |
./gradlew uploadArchive -Drelease=true |
| 36 |
``` |
| 37 |
Then you need to finalize the release to maven central: |
| 38 |
|
| 39 |
* Go to [https://oss.sonatype.org/#stagingRepositories](https://oss.sonatype.org/#stagingRepositories), logging in if necessary. If you don't see anything, click "refresh". |
| 40 |
|
| 41 |
* Find the release you just uploaded. It will probably be at the bottom with a name like comgithubbroadinstitute-1027, with your user ID listed as owner. |
| 42 |
|
| 43 |
* Check the box next to your release, then select "close". Press the refresh button repeatedly until it updates and its status says "closed". |
| 44 |
|
| 45 |
* Select your release again and click "release". Select the box to "automatically drop" in the pop-up confirmation dialog. |
| 46 |
|
| 47 |
It may take ~30-180 minutes for the new release to show up on the maven central. |
| 48 |
|
| 49 |
#### To use this JNI binding on another architecture for which we don't provide a binary: |
| 50 |
|
| 51 |
Go into ```src/main/c```. |
| 52 |
Modify the Makefile to produce a library name appropriate to your system. |
| 53 |
Type ```make``` (you'll need gmake, git, and gcc). |
| 54 |
Move the library you built somewhere permanent on your machine. |
| 55 |
Use ```-DLIBBWA_PATH=<that permanent location>``` when you run GATK (or other Java program). |