As a user pointed out, it is not valid for a GenomeLoc to have a start or stop equal to 0.

This commit is contained in:
Eric Banks 2012-07-17 22:18:43 -04:00
parent 7e2c830636
commit a8d08ea18d
1 changed files with 4 additions and 4 deletions

View File

@ -304,11 +304,11 @@ public final class GenomeLocParser {
return vglHelper(exceptOnError, String.format("The contig index %d is greater than the stored sequence count (%d)", contigIndex, contigInfo.getNSequences()));
if ( mustBeOnReference ) {
if (start < 0)
return vglHelper(exceptOnError, String.format("The start position %d is less than 0", start));
if (start < 1)
return vglHelper(exceptOnError, String.format("The start position %d is less than 1", start));
if (stop < 0)
return vglHelper(exceptOnError, String.format("The stop position %d is less than 0", stop));
if (stop < 1)
return vglHelper(exceptOnError, String.format("The stop position %d is less than 1", stop));
int contigSize = contigInfo.getSequence(contigIndex).getSequenceLength();
if (start > contigSize || stop > contigSize)