Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,34 @@ protected final boolean analyze() {
return integrity && geninit;
}

private final int rejectPairs() {
int n = 0;
for (int ii=0; ii<this.states.size(); ii++) {
if (this.states.get(ii).getSwStatus()!=0 || this.states.get(ii).getHwStatus()!=0
|| this.states.get(ii).getHelicity() == HelicityBit.UDF) {
if (this.states.get(ii).getPairSync() == HelicityBit.PLUS) {
if (ii<this.states.size()-1) {
this.states.get(ii+1).addSwStatusMask(HelicityState.Mask.KILLPAIR);
this.states.get(ii).addSwStatusMask(HelicityState.Mask.KILLPAIR);
n++;
}
}
else if (ii>0) {
this.states.get(ii-1).addSwStatusMask(HelicityState.Mask.KILLPAIR);
this.states.get(ii).addSwStatusMask(HelicityState.Mask.KILLPAIR);
n++;
}
}
}
if (this.states.get(0).getPairSync() == HelicityBit.MINUS) {
this.states.get(0).addSwStatusMask(HelicityState.Mask.KILLPAIR);
}
if (this.states.get(this.states.size()-1).getPairSync() == HelicityBit.PLUS) {
this.states.get(this.states.size()-1).addSwStatusMask(HelicityState.Mask.KILLPAIR);
}
return n;
}

/**
* Perform integrity checking on the sequence.
* @return whether the integrity checking succeeded
Expand Down Expand Up @@ -461,7 +489,8 @@ else if (seconds > (1.0+0.5)/this.helicityClock) {
"\nQUARTET ERRORS: "+quartetErrors+
"\nBIGGAP ERRORS: "+bigGapErrors+
"\nSMALLGAP ERRORS: "+smallGapErrors+
"\nGENERATOR ERRORS: "+generatorErrors
"\nGENERATOR ERRORS: "+generatorErrors+
"\nKILLPAIR ERRORS: "+rejectPairs()
);

return (hwpErrors+syncErrors+quartetErrors+bigGapErrors+smallGapErrors+generatorErrors) == 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static class Mask {
public static final int PATTERN =0x4;
public static final int BIGGAP =0x8;
public static final int SMALLGAP =0x10;
public static final int KILLPAIR =0x12;
}

// FIXME: these should go in CCDB
Expand Down