Package org.broadinstitute.gatk.utils.exceptions

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


     * @return the covariate list
     */
    private static ArrayList<Covariate> addRequiredCovariatesToList(List<Class<? extends RequiredCovariate>> classes) {
        ArrayList<Covariate> dest = new ArrayList<Covariate>(classes.size());
        if (classes.size() != 2)
            throw new ReviewedGATKException("The number of required covariates has changed, this is a hard change in the code and needs to be inspected");

        dest.add(new ReadGroupCovariate()); // enforce the order with RG first and QS next.
        dest.add(new QualityScoreCovariate());
        return dest;
    }
View Full Code Here


            String sample = entry.getKey();
            ReadBackedPileup samplePileup = entry.getValue();
            SampleStratification sampleStratification = (SampleStratification) samples.get(sample);

            if (sampleStratification == null)
                throw new ReviewedGATKException(String.format("Trying to add locus statistics to a sample (%s) that doesn't exist in the Interval.", sample));

            sampleStratification.addLocus(context.getLocation(), samplePileup);
        }
        gcCount += (ref.getBase() == 'G' || ref.getBase() == 'C') ? 1 : 0;
    }
View Full Code Here

        else if ( o instanceof Integer )
            return (Integer)o;
        else if ( o instanceof Long )
            return (Long)o;
        else
            throw new ReviewedGATKException("Object " + o + " is expected to be either a double, long or integer but it's not either: " + o.getClass());
    }
View Full Code Here

        for ( PoolGenotypeData sampleData : sampleDataList ) {
            final Pair<int[],Double> mlACPair = sampleData.GL.getMostLikelyACCount();
            final double topLogGL = mlACPair.second;

            if (sampleData.GL.getAlleles().size() != allAlleles.size())
                throw new ReviewedGATKException("BUG: inconsistent size of alleles!");

            // ref allele is always first in array list
            if (sampleData.GL.alleles.get(0).isNonReference())
                throw new ReviewedGATKException("BUG: first allele in list is not reference!");

            double refGL = sampleData.GL.getLikelihoods()[REFERENCE_IDX];

            // check if maximum likelihood AC is all-ref for current pool. If so, skip
            if (mlACPair.first[REFERENCE_IDX] == sampleData.GL.numChromosomes)
View Full Code Here

        myAlleles = new ArrayList<Allele>(alleles);

        Allele refAllele = alleles.get(0);
        //sanity check: by construction, first allele should ALWAYS be the reference alleles
        if (!refAllele.isReference())
            throw new ReviewedGATKException("BUG: First allele in list passed to GeneralPloidySNPGenotypeLikelihoods should be reference!");

        refByte = refAllele.getBases()[0]// by construction, first allele in list is always ref!

        if (myAlleles.size() < BaseUtils.BASES.length) {
            // likelihood only defined for subset of possible alleles. Fill then with other alleles to have all possible ones,
View Full Code Here

        else if ( o instanceof Integer )
            return ((Integer)o).longValue();
        else if ( o instanceof Double )
            return ((Double)o).longValue();
        else
            throw new ReviewedGATKException("Object " + o + " is expected to be a long but it's not: " + o.getClass());
    }
View Full Code Here

    static Mode parseString(final String input) {
        if( input.equals("SNP") ) { return Mode.SNP; }
        if( input.equals("INDEL") ) { return Mode.INDEL; }
        if( input.equals("BOTH") ) { return Mode.BOTH; }
        throw new ReviewedGATKException("VariantRecalibrator mode string is unrecognized, input = " + input);
    }
View Full Code Here

    public SNPallelePair(Genotype gt) {
        super(gt);

        if (getTopAllele().getBases().length != 1)
            throw new ReviewedGATKException("LOGICAL ERROR: SNPallelePair may not contain non-SNP site!");
        if (getBottomAllele().getBases().length != 1)
            throw new ReviewedGATKException("LOGICAL ERROR: SNPallelePair may not contain non-SNP site!");
    }
View Full Code Here

        if (BaseUtils.basesAreEqual(base, topBase))
            return botBase;
        else if (BaseUtils.basesAreEqual(base, botBase))
            return topBase;
        else
            throw new ReviewedGATKException("LOGICAL ERROR: base MUST match either TOP or BOTTOM!");
    }
View Full Code Here

        if (vcfrWaitingToMerge == null) {
            logger.debug("NOT Waiting to merge...");

            if (!filteredVcfrList.isEmpty())
                throw new ReviewedGATKException("filteredVcfrList should be empty if not waiting to merge a vc!");

            if (curVcIsNotFiltered) { // still need to wait before can release vc
                logger.debug("Waiting for new variant " + GATKVariantContextUtils.getLocation(genomeLocParser, vc));
                vcfrWaitingToMerge = new VCFRecord(vc, false);
            }
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.