Merge branch 'master' of ssh://copper.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
673fc00343
|
|
@ -1,6 +1,7 @@
|
|||
package org.broadinstitute.sting.gatk.walkers.coverage;
|
||||
|
||||
import org.broadinstitute.sting.utils.BaseUtils;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
|
@ -45,8 +46,7 @@ public class DepthOfCoverageStats {
|
|||
|
||||
public static int[] calculateBinEndpoints(int lower, int upper, int bins) {
|
||||
if ( bins > upper - lower || lower < 1 ) {
|
||||
throw new IllegalArgumentException("Illegal argument to calculateBinEndpoints; "+
|
||||
"lower bound must be at least 1, and number of bins may not exceed stop - start");
|
||||
throw new UserException.BadInput("the start must be at least 1 and the number of bins may not exceed stop - start");
|
||||
}
|
||||
|
||||
int[] binLeftEndpoints = new int[bins+1];
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ public class RefSeqCodec implements ReferenceDependentFeatureCodec<RefSeqFeature
|
|||
} catch ( UserException.MalformedGenomeLoc e ) {
|
||||
Utils.warnUser("RefSeq file is potentially incorrect, as some transcripts or exons have a negative length ("+fields[2]+")");
|
||||
return null;
|
||||
} catch ( NumberFormatException e ) {
|
||||
throw new UserException.MalformedFile("Could not parse location from line: " + line);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -473,7 +473,12 @@ public abstract class AbstractVCFCodec implements FeatureCodec, NameAwareCodec {
|
|||
protected static Allele oneAllele(String index, List<Allele> alleles) {
|
||||
if ( index.equals(VCFConstants.EMPTY_ALLELE) )
|
||||
return Allele.NO_CALL;
|
||||
int i = Integer.valueOf(index);
|
||||
final int i;
|
||||
try {
|
||||
i = Integer.valueOf(index);
|
||||
} catch ( NumberFormatException e ) {
|
||||
throw new TribbleException.InternalCodecException("The following invalid GT allele index was encountered in the file: " + index);
|
||||
}
|
||||
if ( i >= alleles.size() )
|
||||
throw new TribbleException.InternalCodecException("The allele with index " + index + " is not defined in the REF/ALT columns in the record");
|
||||
return alleles.get(i);
|
||||
|
|
|
|||
Loading…
Reference in New Issue