ART optimization: BandPassActivityProfile only applies the gaussian filter if the state probability > 0
This commit is contained in:
parent
705cccaf63
commit
52a28968a9
|
|
@ -153,12 +153,16 @@ public class BandPassActivityProfile extends ActivityProfile {
|
||||||
final Collection<ActivityProfileState> states = new LinkedList<ActivityProfileState>();
|
final Collection<ActivityProfileState> states = new LinkedList<ActivityProfileState>();
|
||||||
|
|
||||||
for ( final ActivityProfileState superState : super.processState(justAddedState) ) {
|
for ( final ActivityProfileState superState : super.processState(justAddedState) ) {
|
||||||
for( int jjj = -filterSize; jjj <= filterSize; jjj++ ) {
|
if ( superState.isActiveProb > 0.0 ) {
|
||||||
final GenomeLoc loc = getLocForOffset(justAddedState.getLoc(), jjj);
|
for( int jjj = -filterSize; jjj <= filterSize; jjj++ ) {
|
||||||
if ( loc != null ) {
|
final GenomeLoc loc = getLocForOffset(justAddedState.getLoc(), jjj);
|
||||||
final double newProb = superState.isActiveProb * GaussianKernel[jjj + filterSize];
|
if ( loc != null ) {
|
||||||
states.add(new ActivityProfileState(loc, newProb));
|
final double newProb = superState.isActiveProb * GaussianKernel[jjj + filterSize];
|
||||||
|
states.add(new ActivityProfileState(loc, newProb));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
states.add(justAddedState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue