serialize and deserialize of DnaIndex