oxli-bio / oxli

k-mers and the like
BSD 3-Clause "New" or "Revised" License
15 stars 0 forks source link

Serialising KmerCountTables #25

Closed Adamtaranto closed 2 months ago

Adamtaranto commented 2 months ago

Serialise KmerCountTable objects to disk and load saved objects.

Check out Serde and Bincode.

Serde supports read/write of Python Pickle format. Could make things easier when loading back into Python.

ctb commented 2 months ago

serde is great! we use it in sourmash.

Adamtaranto commented 2 months ago

Leaning towards writing tables to JSON and compressing with Gzip (instead of writing to binary). Readability could be helpful later for users to report weird behaviour.

I'll also add a version attribute to KmerCountTable in case we do anything that affects backwards compatibility in the future.