You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any reason for this, or nobody just had the need (or time) to implement pickle interface?
The latter, I believe. That module is also missing Python 3 compatibility; it might be easier to try writing a pure-Python replacement -- which can import the sped-up C functions at the end of the module, maybe. Either would be nice.
Adding pickle support to the trie object directly is also possible, and actually quite easy in Python. It is also possible in C, but will be quite painful and ugly code. To add pickle support in Python, we'd have to create a Bio/trie.py module or Bio/trie/init.py module (or some other place where the Python code can live).
I don't need Trie objects in Biopython at the moment but would it be a good idea to outsource the Trie objects to pygtrie in Biopython or is that overkill (and just adds another dependency)?
@twrightsman I am not sure if I understand. As far as I can tell, the trie modules on Biopython do not depend on anything else in Biopython, and vice versa, so they are completely independent.
@mdehoon I was suggesting that Biopython drop the Trie module (but agree with @peterjc that it should be depreciated first) and instead suggest to user to use pygtrie instead. Since you mention that nothing else in Biopython is dependent on Trie, it seems to be safe to depreciate?
It had crossed my mind to move Bio.trie to a separate repository and entry on PyPI, but ideally someone would step up to maintain it - otherwise there is little point.
@twrightsman OK. I think it is safe to deprecate and then remove the Trie module.
@peterjc I had also thought about moving Bio.trie to a separate repository, but since pygtrie already exists and looks like it is actively maintained, I guess there is no point to have a separate Bio.trie as well.
Activity
twrightsman commentedon Aug 8, 2016
@etal replied:
twrightsman commentedon Aug 8, 2016
@superbobry replied:
twrightsman commentedon Aug 8, 2016
Can confirm trie object is still not pickleable:
peterjc commentedon Aug 8, 2016
(On the bright side,
Bio.Triehas been updated to support Python 3)mdehoon commentedon Mar 23, 2018
You can pickle the trie as a dictionary:
To get the same trie back, you would do
mdehoon commentedon Mar 23, 2018
Adding pickle support to the trie object directly is also possible, and actually quite easy in Python. It is also possible in C, but will be quite painful and ugly code. To add pickle support in Python, we'd have to create a Bio/trie.py module or Bio/trie/init.py module (or some other place where the Python code can live).
mdehoon commentedon Apr 2, 2018
@twrightsman Would you be able to use the pygtrie package instead of the Trie code in Biopython?
twrightsman commentedon Apr 3, 2018
I don't need Trie objects in Biopython at the moment but would it be a good idea to outsource the Trie objects to pygtrie in Biopython or is that overkill (and just adds another dependency)?
peterjc commentedon Apr 3, 2018
We could just deprecate
Bio.trieand recommend people usepygtrieinstead.mdehoon commentedon Apr 7, 2018
@twrightsman I am not sure if I understand. As far as I can tell, the trie modules on Biopython do not depend on anything else in Biopython, and vice versa, so they are completely independent.
twrightsman commentedon Apr 10, 2018
@mdehoon I was suggesting that Biopython drop the Trie module (but agree with @peterjc that it should be depreciated first) and instead suggest to user to use
pygtrieinstead. Since you mention that nothing else in Biopython is dependent on Trie, it seems to be safe to depreciate?peterjc commentedon Apr 10, 2018
It had crossed my mind to move
Bio.trieto a separate repository and entry on PyPI, but ideally someone would step up to maintain it - otherwise there is little point.mdehoon commentedon Apr 11, 2018
@twrightsman OK. I think it is safe to deprecate and then remove the Trie module.
@peterjc I had also thought about moving Bio.trie to a separate repository, but since pygtrie already exists and looks like it is actively maintained, I guess there is no point to have a separate Bio.trie as well.
peterjc commentedon Apr 11, 2018
I have asked on #636 if they'd like to take over maintenance of Bio.trie as a standalone package.
gmjonker commentedon May 16, 2019
I compared several trie implementations, and found that Bio.trie is by far the best in terms of speed and memory usage.
peterjc commentedon Jul 24, 2020
Closing - We removed
Bio.triein #2501Thank you @chebizarro for issue triage.