compareSingle static method

bool compareSingle(
  1. AminoAcid a,
  2. AminoAcid b,
  3. bool fuzzyComp
)

(en) Compares two AminoAcid and returns true if they are the same.

(ja) 2つのAminoAcidを比較し、同じであればtrueを返します。

  • a : AminoAcid 1.
  • b : AminoAcid 2.
  • fuzzyComp : If true, Can contain B,Z,X,J.

Implementation

static bool compareSingle(AminoAcid a, AminoAcid b, bool fuzzyComp) {
  if (fuzzyComp) {
    if (!a.type.fuzzyComparison(b.type)) {
      return false;
    }
  } else {
    if (a.type != b.type) return false;
  }
  if (a.infoKey != b.infoKey) return false;
  return true;
}