From f1b0f3bc49836a6a7cddf050f6bad1a089a797ee Mon Sep 17 00:00:00 2001 From: ebanks Date: Tue, 16 Nov 2010 01:55:50 +0000 Subject: [PATCH] Putting my changes from earlier in the day back in after someone (rhymes with 'Dark') trounced on them with his last commit... git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4687 348d0f76-0448-11de-a6fe-93d51630548a --- .../features/annotator/AnnotatorInputTableCodec.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/features/annotator/AnnotatorInputTableCodec.java b/java/src/org/broadinstitute/sting/gatk/refdata/features/annotator/AnnotatorInputTableCodec.java index e87986a2e..964d61be9 100755 --- a/java/src/org/broadinstitute/sting/gatk/refdata/features/annotator/AnnotatorInputTableCodec.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/features/annotator/AnnotatorInputTableCodec.java @@ -92,11 +92,14 @@ public class AnnotatorInputTableCodec implements ReferenceDependentFeatureCodec< GenomeLoc loc; String chr = st.nextToken(); - if ( chr.indexOf(":") != -1 ) + if ( chr.indexOf(":") != -1 ) { loc = genomeLocParser.parseGenomeInterval(chr); - else + } else { + if ( st.countTokens() < 3 ) + throw new CodecLineParsingException("Couldn't parse GenomeLoc out of the following line because there aren't enough tokens.\nLine: " + line); loc = genomeLocParser.createGenomeLoc(chr, Integer.valueOf(st.nextToken()), Integer.valueOf(st.nextToken())); - return new AnnotatorInputTableFeature(loc.getContig(), (int)loc.getStart(), (int)loc.getStop()); + } + return new AnnotatorInputTableFeature(loc.getContig(), loc.getStart(), loc.getStop()); }