/** Set the GQ with a log10PError value * * @param pLog10Error * @return */ public GenotypeBuilder log10PError(final double pLog10Error) { if ( pLog10Error == CommonInfo.NO_LOG10_PERROR ) return noGQ(); else return GQ((int)Math.round(pLog10Error * -10)); }
/** Set the GQ with a log10PError value * * @param pLog10Error * @return */ public GenotypeBuilder log10PError(final double pLog10Error) { if ( pLog10Error == CommonInfo.NO_LOG10_PERROR ) return noGQ(); else return GQ((int)Math.round(pLog10Error * -10)); }
protected void ensureGenotypeBuilders(ProcessingContext context) { for (int i = 0; i < context.getCategoryCount(); i++) { if (genotypeBuilder.size() <= i) { genotypeBuilder.add(new GenotypeBuilder(context.getCategoryLabel(i)) .alleles(Arrays.asList(Allele.NO_CALL)) .phased(false) .noAD() .noDP() .noGQ() .noPL()); } } assert(genotypeBuilder.size() >= context.getCategoryCount()); } public IdsvVariantContextBuilder referenceReads(int[] count) {
genotypeBuilder.GQ(Integer.parseInt(value)); } else { genotypeBuilder.noGQ();
if (gtKey.equals(VCFConstants.GENOTYPE_QUALITY_KEY)) { if ( genotypeValues.get(i).equals(VCFConstants.MISSING_GENOTYPE_QUALITY_v3) ) gb.noGQ(); else gb.GQ((int)Math.round(Double.valueOf(genotypeValues.get(i))));
if (gtKey.equals(VCFConstants.GENOTYPE_QUALITY_KEY)) { if ( genotypeValues.get(i).equals(VCFConstants.MISSING_GENOTYPE_QUALITY_v3) ) gb.noGQ(); else gb.GQ((int)Math.round(Double.valueOf(genotypeValues.get(i))));
if (gtKey.equals(VCFConstants.GENOTYPE_QUALITY_KEY)) { if (genotypeValues.get(i).equals(VCFConstants.MISSING_GENOTYPE_QUALITY_v3)) { gb.noGQ(); } else { gb.GQ((int)Math.round(Double.valueOf(genotypeValues.get(i))));
if (gtKey.equals(VCFConstants.GENOTYPE_QUALITY_KEY)) { if (genotypeValues.get(i).equals(VCFConstants.MISSING_GENOTYPE_QUALITY_v3)) { gb.noGQ(); } else { gb.GQ((int)Math.round(Double.valueOf(genotypeValues.get(i))));
gb = new GenotypeBuilder(g).noPL().noGQ().alleles(DIPLOID_NO_CALL); } else { gb = new GenotypeBuilder(g).PL(newPLs).log10PError(newLog10GQ);
if (gtKey.equals(VCFConstants.GENOTYPE_QUALITY_KEY)) { if ( GTValueArray[i].equals(VCFConstants.MISSING_GENOTYPE_QUALITY_v3) ) gb.noGQ(); else gb.GQ((int)Math.round(Double.valueOf(GTValueArray[i])));
gb = new GenotypeBuilder(g).noPL().noGQ().alleles(DIPLOID_NO_CALL); } else { gb = new GenotypeBuilder(g).PL(newPLs).log10PError(newLog10GQ);
builder.noGQ(); attrs.put(GATKVCFConstants.REFERENCE_GENOTYPE_QUALITY, oldGT.getGQ());
final List<Allele> noCallAlleles = (genotype.getPloidy() == 2 ? diploidNoCallAlleles : GATKVariantContextUtils.noCallAlleles(genotype.getPloidy())); genotypes.add(new GenotypeBuilder(genotype).alleles(noCallAlleles).noGQ().make());
gb.noGQ(); } else { gb.PL(newLikelihoods);
final Genotype emptyGT = new GenotypeBuilder(base).alleles(GATKVariantContextUtils.noCallAlleles(2)).noPL().noGQ().make(); tests.add(new Object[]{new VariantContextBuilder(vcBase).genotypes(uninformativeGT).make(), AC, Arrays.asList(emptyGT)}); final Genotype haplpoidEmptyGT = new GenotypeBuilder(base).alleles(GATKVariantContextUtils.noCallAlleles(1)).noPL().noGQ().make(); tests.add(new Object[]{new VariantContextBuilder(vcBase).genotypes(haploidUninformativeGT).make(), AC, Arrays.asList(haplpoidEmptyGT)});
final Genotype emptyGT = new GenotypeBuilder(base).alleles(GATKVariantContextUtils.noCallAlleles(2)).noAD().noPL().noGQ().make(); tests.add(new Object[]{new VariantContextBuilder(vcBase).genotypes(emptyGT).make(), new VariantContextBuilder(vcBase).alleles(AC).make(), Arrays.asList(emptyGT)});
final Genotype emptyGT = new GenotypeBuilder(base).alleles(Collections.nCopies(2, Allele.NO_CALL)).noAD().noPL().noGQ().make(); tests.add(new Object[]{new VariantContextBuilder(vcBase).genotypes(emptyGT).make(), new VariantContextBuilder(vcBase).alleles(AC).make(), Collections.singletonList(emptyGT)}); new VariantContextBuilder(vcBase).source("test-" + i++).alleles(ACG).genotypes(new GenotypeBuilder(base).alleles(AA).AD(homG3AllelesAD).noPL().make()).make(), new VariantContextBuilder(vcBase).source("test-" + i).alleles(AG).make(), Collections.singletonList(new GenotypeBuilder(base).alleles(AlleleSubsettingUtils.DIPLOID_NO_CALL).noPL().AD(new int[]{0, 21}).noGQ().make())});