Package org.broadinstitute.gatk.utils.exceptions

Examples of org.broadinstitute.gatk.utils.exceptions.ReviewedGATKException


    }

    private void stopWaitingToMerge() {
        if (vcfrWaitingToMerge == null) {
            if (!filteredVcfrList.isEmpty())
                throw new ReviewedGATKException("filteredVcfrList should be empty if not waiting to merge a vc!");
            return;
        }

        if (!emitOnlyMergedRecords || vcfrWaitingToMerge.resultedFromMerge)
            innerWriter.add(vcfrWaitingToMerge.vc);
View Full Code Here


                            // Check MNPs vs. CHets:
                            if (containsRefAllele(site1Alleles) && containsRefAllele(site2Alleles)) {
                                logger.debug("HET-HET for " + samp + " at " + GATKVariantContextUtils.getLocation(genomeLocParser, vc1) + ", " + GATKVariantContextUtils.getLocation(genomeLocParser, vc2));
                                if (logger.isDebugEnabled() && !(gt1.isHet() && gt2.isHet()))
                                    throw new ReviewedGATKException("Since !gt1.isHomRef() && !gt2.isHomRef(), yet both have ref alleles, they BOTH must be hets!");

                                // There's the potential to only have REF-ALT, ALT-REF (CHet), or possibly ALT-ALT together (MNP)
                                boolean hasMNP = false;

                                all2It = site2Alleles.iterator();
View Full Code Here

        if ( ts < 0.0 || ts > 100.0)
            throw new UserException("Target FDR is unreasonable " + ts);

        if ( numKnown < 0 || numNovel < 0)
            throw new ReviewedGATKException("Invalid tranche - no. variants is < 0 : known " + numKnown + " novel " + numNovel);

        if ( name == null )
            throw new ReviewedGATKException("BUG -- name cannot be null");
    }
View Full Code Here

        return hasNext;
    }

    public int[] next() {
        if (!hasNext())
            throw new ReviewedGATKException("CANNOT iterate past end!");

        // Copy the assignment to be returned:
        int[] nextList = new int[valList.length];
        for (int i = 0; i < valList.length; i++)
            nextList[i] = valList[i];
View Full Code Here

    public GenomeLoc getGenomeLoc() {
        return loc;
    }
    public int compareTo(final Object o) {
        if (!(o instanceof GenomeEvent))
            throw new ReviewedGATKException("BUG: comparing variant context with non-VC object");

        GenomeEvent otherEvent = (GenomeEvent)o;

         return loc.compareTo(otherEvent.getGenomeLoc());
    }
View Full Code Here

                final double chi2PValue = new ChiSquareTestImpl().chiSquareTest(counts);
                final double penalty = -10.0 * Math.log10(Math.max(chi2PValue, SMALLEST_CHI2_PVALUE));

                // make sure things are reasonable and fail early if not
                if (Double.isInfinite(penalty) || Double.isNaN(penalty))
                    throw new ReviewedGATKException("chi2 value is " + chi2PValue + " at " + getRecalDatum());

                return penalty;
            } catch ( MathException e ) {
                throw new ReviewedGATKException("Failed in calculating chi2 value", e);
            }
        }
    }
View Full Code Here

        this.nObservationsPerQual = nObservationsPerQual;
        this.nLevels = nLevels;
        this.minInterestingQual = minInterestingQual;

        // some sanity checking
        if ( Collections.min(nObservationsPerQual) < 0 ) throw new ReviewedGATKException("Quality score histogram has negative values at: " + Utils.join(", ", nObservationsPerQual));
        if ( nLevels < 0 ) throw new ReviewedGATKException("nLevels must be >= 0");
        if ( minInterestingQual < 0 ) throw new ReviewedGATKException("minInterestingQual must be >= 0");

        // actually run the quantizer
        this.quantizedIntervals = quantize();

        // store the map
View Full Code Here

                map.set(q, interval.getQual());
            }
        }

        if ( Collections.min(map) == Byte.MIN_VALUE )
            throw new ReviewedGATKException("quantized quality score map contains an un-initialized value");

        return map;
    }
View Full Code Here

        public QualInterval merge(final QualInterval toMerge) {
            final QualInterval left = this.compareTo(toMerge) < 0 ? this : toMerge;
            final QualInterval right = this.compareTo(toMerge) < 0 ? toMerge : this;

            if ( left.qEnd + 1 != right.qStart )
                throw new ReviewedGATKException("Attempting to merge non-contiguous intervals: left = " + left + " right = " + right);

            final long nCombinedObs = left.nObservations + right.nObservations;
            final long nCombinedErr = left.nErrors + right.nErrors;

            final int level = Math.max(left.level, right.level) + 1;
View Full Code Here

     * Create a new object
     * @param logger        logger
     * @param UAC           unified arg collection
     */
    protected GenotypeLikelihoodsCalculationModel(UnifiedArgumentCollection UAC, Logger logger) {
        if ( logger == null || UAC == null ) throw new ReviewedGATKException("Bad arguments");
        this.UAC = UAC;
        this.logger = logger;
    }
View Full Code Here

TOP

Related Classes of org.broadinstitute.gatk.utils.exceptions.ReviewedGATKException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.