Deal with ends of contigs

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@900 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-06-04 20:09:53 +00:00
parent 40bc4ae39a
commit 4d880477d6
1 changed files with 6 additions and 0 deletions

View File

@ -61,6 +61,12 @@ public class MismatchIntervalWalker extends LocusWalker<Pair<GenomeLoc, Boolean>
}
public Pair<LinkedList<Boolean>, GenomeLoc> reduce(Pair<GenomeLoc, Boolean> value, Pair<LinkedList<Boolean>, GenomeLoc> sum) {
// if we hit a new contig, clear the list
if ( sum.second != null && sum.second.getContigIndex() != value.first.getContigIndex() ) {
sum.first.clear();
sum.second = null;
}
sum.first.addLast(value.second);
if ( sum.first.size() <= windowSize )
return sum;