Generate User Error for bad POS value

This commit is contained in:
Eric Banks 2012-04-12 09:49:35 -04:00
parent cc71baf691
commit b659b16b31
1 changed files with 6 additions and 1 deletions

View File

@ -204,7 +204,12 @@ public abstract class AbstractVCFCodec implements FeatureCodec, NameAwareCodec {
final List<Allele> alleles = parseAlleles(ref, alts, lineNo);
// find out our location
final int start = Integer.valueOf(locParts[1]);
int start = 0;
try {
start = Integer.valueOf(locParts[1]);
} catch (Exception e) {
generateException("the value in the POS field must be an integer but it was " + locParts[1], lineNo);
}
int stop = start;
// ref alleles don't need to be single bases for monomorphic sites