broadinstitute / pilon

Pilon is an automated genome assembly improvement and variant detection tool
GNU General Public License v2.0
342 stars 60 forks source link

Annotate allelic depth? #135

Open pgcudahy opened 3 years ago

pgcudahy commented 3 years ago

Hello, I'm trying to figure out how to get pilon to annotate allelic depths (AD). It's printed in the header as ##FORMAT=<ID=AD,Number=.,Type=String,Description="Allelic depths for the ref and alt alleles in the order listed"> but none of my VCF files have it annotated in the actual calls. Looking in the code for Vcf.scala, it seems the functionality was removed

    //AD removed
    //if (ac > 0) {
    //  gt += ":AD"
    //  gtInfo += ":" + refDP + "," + altDP 
    //}

Is that right? Or is there a way to have allelic depths added? Thanks very much for any help you can provide.

pgcudahy commented 3 years ago

I tried adding "AD" calls after the fact with gatk VariantAnnotator -A DepthPerAlleleBySample but gatk threw an exception on most of the pilon generated vcf files with htsjdk.tribble.TribbleException$InternalCodecException: The allele with index 1 is not defined in the REF/ALT columns in the record which google doesn't provide much help in debugging.