private void validateGenotypes() { if (this.genotypes == null) throw new IllegalStateException("Genotypes is null"); for (final Genotype g : this.genotypes) { if (g.isAvailable()) { for (Allele gAllele : g.getAlleles()) { if (!hasAllele(gAllele) && gAllele.isCalled()) throw new IllegalStateException( "Allele in genotype " + gAllele + " not in the variant context " + alleles); } } } }