SelectVariant JEXL expression to select private variants from multisample VCF
I hava multi-sample VCF file from which i need to extract shared private variants(variants shared only a specific group) . I have used the below command to find shared variants.
java -Xmx4g -jar GenomeAnalysisTK.jar -T SelectVariants -R ref.fa --variant goodAA.final.vcf -select 'vc.getGenotype("LJ1A2").isHomVar() && vc.getGenotype("LJA3").isHomVar()' > shared.vcf
This gives the shared variants in LJ1A2 and LJA3. And I can use the below expression to find shared private variants
'vc.getGenotype("LJ1A2").isHomVar() && vc.getGenotype("LJA3").isHomVar() && vc.getGenotype("JLA4").isHomRef()'
this gives the shared hom varaints in LJ1A2, LJA3 and REF in JLA4. i.e. shared private hom variants with respect to one control (JLA4).
How can specify all the other samples (100's) in the vcf file to have '.isHomRef()' except those specified to have '.isHomVar' ?
It would be complex to specify each and every sample manually when there are >200 samples. COuld someone suggest a smoother way of doing this by using any wild cards?