Entering edit mode
11.0 years ago
William
★
5.3k
How can I use the GATK tools as an API from a java program? For example to run the unifed genotyper. How can I do the following command line call as a API call?
java -jar GenomeAnalysisTK.jar -T UnifiedGenotyper -R my.fasta -I my.bam- my.vcf
To use a Picard tool as an API I just do the following.
MergeSamFiles mergeSamFiles = new MergeSamFiles();
ArrayList<File> inputFileList = new ArrayList<File>();
inputFileList.add(new File("myFile.bam"));
mergeSamFiles.INPUT = inputFileList;
//set other parameters;
mergeSamFiles.doWork();
I am looking for the samething with GATK.
What I want to do is to make a small pipeline containing BWA (run on a cluster via SGE DRMAA API), Picard, and GATK to process a bulk of data. Calling the GATK command line from java I guess can't be worse than calling it from perl or a shell script.
use a Makefile + qmake http://gridscheduler.sourceforge.net/htmlman/htmlman1/qmake.html
What is the benifit above using the SGE DRMAA API? http://arc.liv.ac.uk/SGE/howto/drmaa_java.html
interesting I didn't know this API. But as far as I can see you'll have to code and reinvent the wheel (e.g: do I really need to realign this FASTQ ? Should I merge those BAMS if the file already exists and is newer that the BAMs ? ) while the venerable Make will run those jobs for you.