public boolean isHigherImpactThan(SnpEffEffect other) { // If one effect is within a coding gene and the other is not, the effect that is // within the coding gene has higher impact: if (isCoding() && !other.isCoding()) { return true; } else if (!isCoding() && other.isCoding()) { return false; } // Otherwise, both effects are either in or not in a coding gene, so we compare the impacts // of the effects themselves. Effects with the same impact are tie-broken using the // functional class of the effect: if (impact.isHigherImpactThan(other.impact)) { return true; } else if (impact.isSameImpactAs(other.impact)) { return functionalClass.isHigherPriorityThan(other.functionalClass); } return false; }