Fixing the bug introduced with the earlier commit. When trimming locus to the current bases, we need to take into account expanded boundaries (for windowed reference traversals)

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3059 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
asivache 2010-03-22 19:20:34 +00:00
parent ee1dc6092f
commit 543aefc3d7
1 changed files with 4 additions and 2 deletions

View File

@ -158,8 +158,10 @@ public class LocusReferenceView extends ReferenceView {
} }
protected GenomeLoc trimToBounds(GenomeLoc l) { protected GenomeLoc trimToBounds(GenomeLoc l) {
if ( l.getStart() < bounds.getStart() ) l = GenomeLocParser.setStart(l, bounds.getStart()); long expandedStart = getWindowStart( bounds );
if ( l.getStop() > bounds.getStop() ) l = GenomeLocParser.setStop(l, bounds.getStop()); long expandedStop = getWindowStop( bounds );
if ( l.getStart() < expandedStart ) l = GenomeLocParser.setStart(l, expandedStart);
if ( l.getStop() > expandedStop ) l = GenomeLocParser.setStop(l, expandedStop);
return l; return l;
} }