a better error message for the situation where a RMD track generates a negitive length interval; the user will now see a message like "Bad input: A feature produced by the reference metadata track named "bed" at position chr1:10434-10433 has a start greater than the stop; this is an invalid position "
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4958 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
4272b824d6
commit
56b87da8f9
|
|
@ -27,6 +27,8 @@ import org.broad.tribble.Feature;
|
|||
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
|
||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -44,7 +46,7 @@ public abstract class GATKFeature implements Feature {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
private String name;
|
||||
String name;
|
||||
|
||||
protected void setName(String name) {
|
||||
this.name = name;
|
||||
|
|
@ -73,6 +75,9 @@ public abstract class GATKFeature implements Feature {
|
|||
}
|
||||
public GenomeLoc getLocation() {
|
||||
if (position == null) position = genomeLocParser.createGenomeLoc(feature.getChr(), feature.getStart(), feature.getEnd());
|
||||
if (position.getStart() > position.getStop()) {
|
||||
throw new UserException.BadInput("A feature produced by the reference metadata track named \"" + this.name + "\" at position " + position + " has a start greater than the stop; this is an invalid this is an invalid position");
|
||||
}
|
||||
return position;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue