complementDNA method

EnumBase complementDNA()

Converts to complementary bases in DNA.

Implementation

EnumBase complementDNA() {
  if (this == EnumBase.a) {
    return EnumBase.t;
  } else if (this == EnumBase.t) {
    return EnumBase.a;
  } else if (this == EnumBase.g) {
    return EnumBase.c;
  } else if (this == EnumBase.c) {
    return EnumBase.g;
  } else if (this == EnumBase.m) {
    return EnumBase.k;
  } else if (this == EnumBase.k) {
    return EnumBase.m;
  } else if (this == EnumBase.r) {
    return EnumBase.y;
  } else if (this == EnumBase.y) {
    return EnumBase.r;
  } else if (this == EnumBase.w) {
    return EnumBase.w;
  } else if (this == EnumBase.s) {
    return EnumBase.s;
  } else if (this == EnumBase.v) {
    return EnumBase.b;
  } else if (this == EnumBase.b) {
    return EnumBase.v;
  } else if (this == EnumBase.h) {
    return EnumBase.d;
  } else if (this == EnumBase.d) {
    return EnumBase.h;
  } else {
    return EnumBase.n;
  }
}