public void set(String seqStr) {
		if (seqStr == null) {
			length = 0;
			codes = null;
		} else {
			length = seqStr.length();
			int ilen = length / BASES_PER_BYTE + (length % BASES_PER_BYTE != 0 ? 1 : 0);
			codes = new byte[ilen];
			char seqChar[] = seqStr.toCharArray();

			// Create binary sequence
			int j = 0, i = 0, k = 0;
			byte s = 0;
			for (; i < seqChar.length; i++) {
				s <<= 2;
				s |= BASE2CODE[seqChar[i]];
				k++;
				if (k >= BASES_PER_BYTE) {
					codes[j] = s;
					k = 0;
					j++;
					s = 0;
				}
			}

			// Last word: Shift the last bits
			if ((k < BASES_PER_BYTE) && (k != 0)) {
				s <<= BITS_PER_BASE * (BASES_PER_BYTE - k);
				codes[j] = s;
			}
		}
	}