}
};
ArrayList<LandscapeScoringResultEntry> ress= ls.getResultEntries();
for( int i=0; i<ress.size() ; i++ ){
LandscapeScoringResultEntry res= ress.get(i);
DirectionalGenomicRegion gr= (DirectionalGenomicRegion)res.gr;
double[] vs= res.scores;
int slow= gr.isOnForwardStrand() ? side5: side3,
shigh= gr.isOnForwardStrand() ? side3 : side5;
if(vs.length > (slow+shigh)){
int left= slow;
while( true ){
if(left>= (vs.length-shigh)){
break;
}
int right= (left+intv)<vs.length ? left+intv : vs.length-1;
double area= 0;
for( int k=left; k<=right ; k++ ){
area+= vs[k];
}
double na= area/ (right-left+1);
if(na> thr){
DirectionalGenomicRegion grr= new DirectionalGenomicRegion(
gr.chr, gr.strand, (int)gr.low+left, (int)gr.low+right);
grr.attr= gr.attr;
gbout.add(grr);
totarea+= area;