GATK Python wrappers??

priesgopriesgo Posts: 19Member
edited January 2013 in Ask the GATK team

Hi all,

Wouldn't it be useful to have GATK wrapped into a Python API?
pygatk. As pysam is for samtools or pybedtools is for bedtools. Is anybody developing this?


Post edited by Geraldine_VdAuwera on


  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,365Administrator, GATK Developer admin

    Speaking as a fan of Python, I think that would be great. But the closest I've seen was someone using Clojure to wrap the GATK.

    Geraldine Van der Auwera, PhD

  • priesgopriesgo Posts: 19Member

    If I could just duplicate myself...

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 7,365Administrator, GATK Developer admin

    I can't quite bring myself to recommend forking rather than duplication ;)

    Geraldine Van der Auwera, PhD

  • chapmanbchapmanb Posts: 19Member

    The issue with building a Python library on top of GATK is the language mismatch. Since GATK is Java, you need to use Jython to have direct access to the API. In contrast, pysam and pybedtools are both based on C code bases. If you're interested in Python and GATK, I have a variant calling pipeline that implements GATK best practices:

    On the direct API side, here is the Clojure library Geraldine mentioned:

    Clojure is a nice language that appeals to a lot of Python programmers, so is worth checking out if you need to work directly with JVM APIs.

    Brad Chapman, Bioinformatics Core at Harvard School of Public Health

  • priesgopriesgo Posts: 19Member

    Nice pipeline! I'm doing something similar but at the moment I am keeping a command line interface approach.
    By the way, didn't you have any issues with jython? In a similar situation in another project I ended up using jpype to connect python with Java code.

Sign In or Register to comment.