Read more about it here!
Using GATK as a library
We are using GATK as part of our internal pipelines written in Java. Currently we are making command-line calls to the GenomeAnalysisTk jar, but this generated intermediate files and it would be better if we could just directly call the relevant functions in the target and hold the results in memory. Reading the source it is not immediately obvious so I was hoping for some guidance. As an example of a how we use it as part of our pipeline:
java -jar GenomeAnalysisTK.jar -T RealignerTargetCreator -R -I -o
java -jar GenomeAnalysisTK.jar -T IndelRealigner -R -targetIntervals -I --o <realigned.ban>