Selecting sites from VCF which have an alt AD > 10
using vcfilterjs

and the following script:

function accept(vc)
    {
    var i,j;
    for(i=0;i&lt; vc.getNSamples();++i)
        {
        var genotype = vc.getGenotype(i);
        if(!genotype.hasAD()) continue;
        var ad = genotype.getAD();
        /* loop over AD starting from '1' =  first ALT */
        for(j=1  ;j&lt; ad.length ;++j)
            {
            if(ad[j]&gt;10) return true;
            }
        }
    return false;
    }
accept(variant);


usage:

java -jar dist/vcffilterjs.jar -f script.js Test.vcf