compare static method
(en) Compares two NucleotideSequence and returns true if they are the same.
(ja) 2つのNucleotideSequenceを比較し、同じであればtrueを返します。
a
: Sequence 1.b
: Sequence 2.fuzzyComp
: If true, Can contain m, r, w, s, y, k, v, h, d, b, n. If true, t and u are searched as the same.
Implementation
static bool compare(
NucleotideSequence a, NucleotideSequence b, bool fuzzyComp) {
if (a.length() != a.length()) return false;
for (int i = 0; i < a.length(); i++) {
if (fuzzyComp) {
if (!a.sequence[i].base.fuzzyComparison(b.sequence[i].base)) {
return false;
}
} else {
if (a.sequence[i].base != b.sequence[i].base) return false;
}
if (a.sequence[i].infoKey != b.sequence[i].infoKey) return false;
}
return true;
}