oxli-bio / oxli

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

Serialising KmerCountTables #25

Open Adamtaranto opened 1 week ago

Adamtaranto commented 1 week 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 1 week ago

serde is great! we use it in sourmash.

Adamtaranto commented 1 week 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.