Do not add the first and last 4 cycles to the recalibration tables.

This commit is contained in:
Mauricio Carneiro 2012-04-26 13:32:38 -04:00
parent 08dbd756f3
commit 1db2d1ba82
1 changed files with 4 additions and 2 deletions

View File

@ -78,8 +78,10 @@ public class CycleCovariate implements StandardCovariate {
increment = readOrderFactor;
}
for (int i = 0; i < read.getReadLength(); i++) {
cycles[i] = BitSetUtils.bitSetFrom(cycle);
final int CUSHION = 4;
final int MAX_CYCLE = read.getReadLength() - CUSHION - 1;
for (int i = 0; i < MAX_CYCLE; i++) {
cycles[i] = (i<CUSHION || i>MAX_CYCLE) ? null : BitSetUtils.bitSetFrom(cycle);
cycle += increment;
}
}