Better error checking/output

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4676 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-11-15 16:36:34 +00:00
parent f2ee5dc319
commit 35382468ee
1 changed files with 5 additions and 2 deletions

View File

@ -92,10 +92,13 @@ 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());
}