Fixed bug where read traversals would fail with an exception when not called with a genome_region (-L) argument. From TraversalEngine, line 455, looks like Mark intended an invariant where the list of locations is 0 length if not specified. Made GenomeLoc code compliant with that.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@230 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
hanna 2009-03-30 23:43:12 +00:00
parent e812cfbf55
commit 7fda409f4e
1 changed files with 2 additions and 2 deletions

View File

@ -252,7 +252,7 @@ public class GenomeLoc implements Comparable<GenomeLoc> {
* @return true if we are past the last location to process
*/
public static boolean pastFinalLocation(GenomeLoc curr, ArrayList<GenomeLoc> locs) {
if ( locs == null )
if ( locs.size() == 0 )
return false;
else {
GenomeLoc last = locs.get(locs.size() - 1);
@ -268,7 +268,7 @@ public class GenomeLoc implements Comparable<GenomeLoc> {
* @return true if we should process GenomeLoc curr, otherwise false
*/
public static boolean inLocations(GenomeLoc curr, ArrayList<GenomeLoc> locs) {
if (locs == null) {
if ( locs.size() == 0 ) {
return true;
} else {
for ( GenomeLoc loc : locs ) {