@@ -388,6 +388,34 @@ protected final boolean analyze() {
388388 return integrity && geninit ;
389389 }
390390
391+ private final int rejectPairs () {
392+ int n = 0 ;
393+ for (int ii =0 ; ii <this .states .size (); ii ++) {
394+ if (this .states .get (ii ).getSwStatus ()!=0 || this .states .get (ii ).getHwStatus ()!=0
395+ || this .states .get (ii ).getHelicity () == HelicityBit .UDF ) {
396+ if (this .states .get (ii ).getPairSync () == HelicityBit .PLUS ) {
397+ if (ii <this .states .size ()-1 ) {
398+ this .states .get (ii +1 ).addSwStatusMask (HelicityState .Mask .KILLPAIR );
399+ this .states .get (ii ).addSwStatusMask (HelicityState .Mask .KILLPAIR );
400+ n ++;
401+ }
402+ }
403+ else if (ii >0 ) {
404+ this .states .get (ii -1 ).addSwStatusMask (HelicityState .Mask .KILLPAIR );
405+ this .states .get (ii ).addSwStatusMask (HelicityState .Mask .KILLPAIR );
406+ n ++;
407+ }
408+ }
409+ }
410+ if (this .states .get (0 ).getPairSync () == HelicityBit .MINUS ) {
411+ this .states .get (0 ).addSwStatusMask (HelicityState .Mask .KILLPAIR );
412+ }
413+ if (this .states .get (this .states .size ()-1 ).getPairSync () == HelicityBit .PLUS ) {
414+ this .states .get (this .states .size ()-1 ).addSwStatusMask (HelicityState .Mask .KILLPAIR );
415+ }
416+ return n ;
417+ }
418+
391419 /**
392420 * Perform integrity checking on the sequence.
393421 * @return whether the integrity checking succeeded
@@ -461,7 +489,8 @@ else if (seconds > (1.0+0.5)/this.helicityClock) {
461489 "\n QUARTET ERRORS: " +quartetErrors +
462490 "\n BIGGAP ERRORS: " +bigGapErrors +
463491 "\n SMALLGAP ERRORS: " +smallGapErrors +
464- "\n GENERATOR ERRORS: " +generatorErrors
492+ "\n GENERATOR ERRORS: " +generatorErrors +
493+ "\n KILLPAIR ERRORS: " +rejectPairs ()
465494 );
466495
467496 return (hwpErrors +syncErrors +quartetErrors +bigGapErrors +smallGapErrors +generatorErrors ) == 0 ;
0 commit comments