dib-lab / khmer

In-memory nucleotide sequence k-mer counting, filtering, graph traversal and more
http://khmer.readthedocs.io/
Other
749 stars 294 forks source link

add khmer 2.x compat functions back in #1861

Open ctb opened 6 years ago

ctb commented 6 years ago

it would be nice to be able to use the next release of khmer with the current version of sourmash, and I think right now sourmash depends on khmer.load_nodegraph which doesn't exist in master. maybe we could put that back into khmer?

luizirber commented 6 years ago

we can also do

- self._data = khmer.load_nodegraph(f.name)
+ self._data = khmer.Nodegraph.load(f.name)

(from this PR: https://github.com/dib-lab/sourmash/pull/395/files#diff-0b5baa8c66f625d5b16a6ada6c9aa998R681)

standage commented 6 years ago

Yeah, I think it would be clean and easy to add a clearly marked "backwards compatibility" section to the khmer/__init__.py file with a few such definitions. Let me know if there are any others.

camillescott commented 6 years ago

I'm -1 on this. It should be on external libraries to route around deprecated APIs.

luizirber commented 6 years ago

We got around this issue in sourmash with https://github.com/dib-lab/sourmash/pull/508