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:
parent
7e2c830636
commit
a8d08ea18d
|
|
@ -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()));
|
return vglHelper(exceptOnError, String.format("The contig index %d is greater than the stored sequence count (%d)", contigIndex, contigInfo.getNSequences()));
|
||||||
|
|
||||||
if ( mustBeOnReference ) {
|
if ( mustBeOnReference ) {
|
||||||
if (start < 0)
|
if (start < 1)
|
||||||
return vglHelper(exceptOnError, String.format("The start position %d is less than 0", start));
|
return vglHelper(exceptOnError, String.format("The start position %d is less than 1", start));
|
||||||
|
|
||||||
if (stop < 0)
|
if (stop < 1)
|
||||||
return vglHelper(exceptOnError, String.format("The stop position %d is less than 0", stop));
|
return vglHelper(exceptOnError, String.format("The stop position %d is less than 1", stop));
|
||||||
|
|
||||||
int contigSize = contigInfo.getSequence(contigIndex).getSequenceLength();
|
int contigSize = contigInfo.getSequence(contigIndex).getSequenceLength();
|
||||||
if (start > contigSize || stop > contigSize)
|
if (start > contigSize || stop > contigSize)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue