The tighter interval validation wasn't interacting well with unmapped
intervals -- altered the validation methods to not throw an error for unmapped intervals. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5700 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
6d5e45b5c6
commit
6e9e766a71
|
|
@ -493,6 +493,10 @@ public class GenomeLocParser {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private GenomeLoc exceptionOnInvalidGenomeLoc(GenomeLoc toReturn) {
|
private GenomeLoc exceptionOnInvalidGenomeLoc(GenomeLoc toReturn) {
|
||||||
|
if ( GenomeLoc.isUnmapped(toReturn) ) {
|
||||||
|
return toReturn;
|
||||||
|
}
|
||||||
|
|
||||||
if (toReturn.getStart() < 0) {
|
if (toReturn.getStart() < 0) {
|
||||||
throw new ReviewedStingException("Parameters to GenomeLocParser are incorrect: the start position is less than 0 " +
|
throw new ReviewedStingException("Parameters to GenomeLocParser are incorrect: the start position is less than 0 " +
|
||||||
"in interval: " + toReturn);
|
"in interval: " + toReturn);
|
||||||
|
|
@ -526,6 +530,10 @@ public class GenomeLocParser {
|
||||||
* @param locus Locus to verify.
|
* @param locus Locus to verify.
|
||||||
*/
|
*/
|
||||||
private void exceptionOnInvalidGenomeLocBounds(GenomeLoc locus) {
|
private void exceptionOnInvalidGenomeLocBounds(GenomeLoc locus) {
|
||||||
|
if ( GenomeLoc.isUnmapped(locus) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int contigSize = contigInfo.getSequence(locus.getContigIndex()).getSequenceLength();
|
int contigSize = contigInfo.getSequence(locus.getContigIndex()).getSequenceLength();
|
||||||
if(locus.getStart() > contigSize)
|
if(locus.getStart() > contigSize)
|
||||||
throw new UserException.MalformedGenomeLoc("GenomeLoc is invalid: locus start is after the end of contig",locus);
|
throw new UserException.MalformedGenomeLoc("GenomeLoc is invalid: locus start is after the end of contig",locus);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue