Writing a custom org.broadinstitute.gatk.tools.walkers.annotator.InfoFieldAnnotation

lindenblindenb FranceMember ✭✭

I'm playing with the package org.broadinstitute.gatk.tools.walkers.annotator and I wonder if I can write the following custom variant annotator:

I've got a set of tabix-ed files in a directory (one txt.bgz per chromosome) and I want to peek the information from those files.

  • Can I specify an external resource like a directory for -T VariantAnnotator ? If no, can I add something like a java annotation to specify a new cmd-line argument in my CustomAnnotation.java ? (I don't want to modify VariantAnnotator.java )
class CustomAnnotation  extends InfoFieldAnnotation  {
@Argument(fullName = "mydir", shortName = "mydir", doc="My directory of tabix files", required=true)
File dir;


  • Parallelism : if my CustomAnnotation open some tabix files, should I care about parallelism ? (e.g: open the tabix file for each thread )

  • there is a initialize method in VariantAnnotatorAnnotation but no dispose ?

Thanks !


Issue · Github
by Sheila

Issue Number
Last Updated

Best Answer


  • lindenblindenb FranceMember ✭✭

    Ok thank you Geraldine. I was just curious if I could implement a custom annotator using the gatk. I'll stick to htsjdk-only :-)

Sign In or Register to comment.