static CharacterChromosome read(final DataInput in) throws IOException {
		final var lengthRange = IntRange.of(readInt(in), readInt(in));
		final var validCharacters = new CharSeq(readString(in));
		final var chars = readString(in);

		final MSeq<CharacterGene> values = MSeq.ofLength(chars.length());
		for (int i = 0, n = chars.length(); i <  n; ++i) {
			values.set(i, CharacterGene.of(chars.charAt(i), validCharacters));
		}

		return new CharacterChromosome(values.toISeq(), lengthRange);
	}
Create a new chromosome from the given genes (given as string).

@param alleles the character genes.
@return a new {@code CharacterChromosome} with the given parameter
@throws IllegalArgumentException if the genes string is empty.
jenetics/src/main/java/io/jenetics/CharacterChromosome.java