@Override public String filter(final VariantContext ctx, final Genotype gt) { if (gt.getGQ() < minGq) return "LowGQ"; else return null; } }
@Override public String filter(final VariantContext ctx, final Genotype gt) { if (gt.getGQ() < minGq) return "LowGQ"; else return null; } }
/** * Does the GQ field have a value? * @return true if there's a GQ field value */ public boolean hasGQ() { return getGQ() != -1; }
/** * Does the GQ field have a value? * @return true if there's a GQ field value */ public boolean hasGQ() { return getGQ() != -1; }
@Override public int getGenotypeQuality(Genotype gt) { return gt.getGQ(); }
@Override public int getGenotypeQuality(Genotype gt) { return gt.getGQ(); }
@Override public int getGenotypeQuality(Genotype gt) { return gt.getGQ(); }
@Override public int getGenotypeQuality(Genotype gt) { return gt.getGQ(); }
public double getPhredScaledQual() { return vcfGenotype.getGQ(); }
@Deprecated public double getLog10PError() { return getGQ() / -10.0; } @Deprecated public int getPhredScaledQual() { return getGQ(); }
/** * Does the GQ field have a value? * @return true if there's a GQ field value */ @Ensures("(result == false && getGQ() == -1) || (result == true && getGQ() >= 0)") public boolean hasGQ() { return getGQ() != -1; }
public String toBriefString() { return String.format("%s:Q%d", getGenotypeString(false), getGQ()); }
public String toBriefString() { return String.format("%s:Q%d", getGenotypeString(false), getGQ()); }
public String toBriefString() { return String.format("%s:Q%d", getGenotypeString(false), getGQ()); }
private void updateDetailMetric(final VariantCallingDetailMetrics metric, final Genotype genotype, final VariantContext vc, final boolean hasSingletonSample) { updateSummaryMetric(metric, genotype, vc, hasSingletonSample); if (genotype != null && !vc.isFiltered()) { if (genotype.getGQ() == 0) { ++metric.TOTAL_GQ0_VARIANTS; } if (genotype.isHet()) { ++metric.numHets; } else if (genotype.isHomVar()) { ++metric.numHomVar; } } }
private boolean checkGQIsGood(Genotype genotype) { if ( genotype.hasGQ() ) { return genotype.getGQ() >= minGenotypeQuality; } else if ( genotype.hasLikelihoods() ) { double log10gq = GenotypeLikelihoods.getGQLog10FromLikelihoods(genotype.getType().ordinal()-1,genotype.getLikelihoods().getAsVector()); return QualityUtils.phredScaleLog10ErrorRate(log10gq) >= minGenotypeQuality; } return minGenotypeQuality <= 0; }
private boolean genotypeCanBeMergedInCurrentBlock(final Genotype g) { return currentBlock != null && currentBlock.withinBounds(capToMaxGQ(g.getGQ())) && currentBlock.getPloidy() == g.getPloidy() && (currentBlock.getMinPLs() == null || !g.hasPL() || (currentBlock.getMinPLs().length == g.getPL().length)); }
public String toString() { return String.format("[%s %s%s%s%s%s%s%s]", getSampleName(), getGenotypeString(false), toStringIfExists(VCFConstants.GENOTYPE_QUALITY_KEY, getGQ()), toStringIfExists(VCFConstants.DEPTH_KEY, getDP()), toStringIfExists(VCFConstants.GENOTYPE_ALLELE_DEPTHS, getAD()), toStringIfExists(VCFConstants.GENOTYPE_PL_KEY, getPL()), toStringIfExists(VCFConstants.GENOTYPE_FILTER_KEY, getFilters()), sortedString(getExtendedAttributes())); }
public String toString() { return String.format("[%s %s%s%s%s%s%s%s]", getSampleName(), getGenotypeString(false), toStringIfExists(VCFConstants.GENOTYPE_QUALITY_KEY, getGQ()), toStringIfExists(VCFConstants.DEPTH_KEY, getDP()), toStringIfExists(VCFConstants.GENOTYPE_ALLELE_DEPTHS, getAD()), toStringIfExists(VCFConstants.GENOTYPE_PL_KEY, getPL()), toStringIfExists(VCFConstants.GENOTYPE_FILTER_KEY, getFilters()), sortedString(getExtendedAttributes())); }
public String toString() { return String.format("[%s %s%s%s%s%s%s%s]", getSampleName(), getGenotypeString(false), toStringIfExists(VCFConstants.GENOTYPE_QUALITY_KEY, getGQ()), toStringIfExists(VCFConstants.DEPTH_KEY, getDP()), toStringIfExists(VCFConstants.GENOTYPE_ALLELE_DEPTHS, getAD()), toStringIfExists(VCFConstants.GENOTYPE_PL_KEY, getPL()), toStringIfExists(VCFConstants.GENOTYPE_FILTER_KEY, getFilters()), sortedString(getExtendedAttributes())); }