Package org.broadinstitute.gatk.utils.exceptions

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


        // Target instance into which to inject the value.
        Collection<Object> targets = findTargets( source, instance );

        // Abort if no home is found for the object.
        if( targets.size() == 0 )
            throw new ReviewedGATKException("Internal command-line parser error: unable to find a home for argument matches " + argumentMatches);

        for( Object target: targets ) {
            Object value;
            boolean usedTypeDefault = false;
            if ( argumentMatches.size() != 0 ) {
View Full Code Here


    /** Number of exons in this transcript */
    public int getNumExons() { return exons.size(); }

    /** Genomic location of the n-th exon; throws an exception if n is out of bounds */
    public GenomeLoc getExonLocation(int n) {
        if ( n >= exons.size() || n < 0 ) throw new ReviewedGATKException("Index out-of-bounds. Transcript has " + exons.size() +" exons; requested: "+n);
        return exons.get(n);
    }
View Full Code Here

            return ((double) num)/denom;
        } else {
            if ( num == 0 && denom == 0) {
                return 0.0;
            } else {
                throw new ReviewedGATKException(String.format("The denominator of a ratio cannot be zero or less than zero: %d/%d",num,denom));
            }
        }
    }
View Full Code Here

            return ((double) num)/denom;
        } else {
            if ( num == 0L && denom == 0L ) {
                return 0.0;
            } else {
                throw new ReviewedGATKException(String.format("The denominator of a ratio cannot be zero or less than zero: %d/%d",num,denom));
            }
        }
    }
View Full Code Here

     * @param y vector 2
     * @return a double representing log (dotProd(10.^x,10.^y)
     */
    public static double logDotProduct(final double [] x, final double[] y) {
        if (x.length != y.length)
            throw new ReviewedGATKException("BUG: Vectors of different lengths");

        double tmpVec[] = new double[x.length];

        for (int k=0; k < tmpVec.length; k++ ) {
            tmpVec[k] = x[k]+y[k];
View Full Code Here

     * @param y                 Second vector
     * @return Vector of same length as x and y so that z[k] = x[k]+y[k]
     */
    public static double[] vectorSum(final double[]x, final double[] y) {
        if (x.length != y.length)
            throw new ReviewedGATKException("BUG: Lengths of x and y must be the same");

        double[] result = new double[x.length];
        for (int k=0; k <x.length; k++)
            result[k] = x[k]+y[k];

View Full Code Here

     * @param y                 Second vector
     * @return Vector of same length as x and y so that z[k] = x[k]-y[k]
     */
    public static int[] vectorDiff(final int[]x, final int[] y) {
        if (x.length != y.length)
            throw new ReviewedGATKException("BUG: Lengths of x and y must be the same");

        int[] result = new int[x.length];
        for (int k=0; k <x.length; k++)
            result[k] = x[k]-y[k];

View Full Code Here

         * @param n operand
         * @return log10(n)
         */
        public static double get(final int n) {
            if (n < 0)
                throw new ReviewedGATKException(String.format("Can't take the log of a negative number: %d", n));
            if (n >= cache.length)
                ensureCacheContains(Math.max(n+10, 2*cache.length));
            /*
               Array lookups are not atomic.  It's possible that the reference to cache could be
               changed between the time the reference is loaded and the data is fetched from the correct
View Full Code Here

     * @param emailAddress The user's email address, which we will store in the key and sign
     * @param signingAlgorithm The combination of hash and encryption algorithms to use to sign the key
     */
    public GATKKey ( PrivateKey privateKey, PublicKey publicKey, String emailAddress, String signingAlgorithm ) {
        if ( privateKey == null || publicKey == null || emailAddress == null || emailAddress.length() == 0 || signingAlgorithm == null ) {
            throw new ReviewedGATKException("Cannot construct GATKKey using null/empty arguments");
        }

        this.privateKey = privateKey;
        this.publicKey = publicKey;
        this.emailAddress = emailAddress;
        this.signingAlgorithm = signingAlgorithm;

        validateEmailAddress();
        generateSignature();

        if ( ! isValid() ) {
            throw new ReviewedGATKException("Newly-generated GATK key fails validation -- this should never happen!");
        }
    }
View Full Code Here

     * @param keyFile File containing the GATK key to load
     * @param signingAlgorithm The combination of hash and encryption algorithms used to sign the key
     */
    public GATKKey ( PublicKey publicKey, File keyFile, String signingAlgorithm ) {
        if ( publicKey == null || keyFile == null || signingAlgorithm == null ) {
            throw new ReviewedGATKException("Cannot construct GATKKey using null arguments");
        }

        this.publicKey = publicKey;
        this.signingAlgorithm = signingAlgorithm;

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.