Closed alimanfoo closed 6 years ago
cc @hardingnj
I think I can implement this functionality using the __array_interface__
property similar to how pyfasta FastaRecord
objects work:
@brentp can you let me know if there's anything else needed for this feature?
If possible that would be great, thank you.
I don't think anything else is needed. thanks for implementing!
No problem. I added support in the current master branch, but still have to figure out python3 buffer interface compatibility. It works in python 2.7 currently, so if that's what you're using you can test it out like this:
pip install -e git+https://github.com/mdshw5/pyfaidx.git#egg=pyfaidx
I've figured out python3 compatibility and just pushed a new release. CI should finish in a few minutes and you can then install version 0.5.4, which includes this new feature. Please let me know if it doesn't work as expected and I'll be glad to help further.
Awesome, thank you!
On Sat, 12 May 2018, 16:45 Matt Shirley, notifications@github.com wrote:
I've figured out python3 compatibility and just pushed a new release. CI should finish in a few minutes and you can then install version 0.5.4, which includes this new feature. Please let me know if it doesn't work as expected and I'll be glad to help further.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mdshw5/pyfaidx/issues/139#issuecomment-388563752, or mute the thread https://github.com/notifications/unsubscribe-auth/AAq8Qmg8UbWy6HQcYLQYsDqea7dQVwU5ks5txwOWgaJpZM4T7KIQ .
Just to say, works like a charm on my mosquito genomes, thanks again.
Apologies if I've missed this in the documentation. I've been using pyfasta for a long time and often make use of the ability to load a sequence into a numpy array, e.g.:
Is there an equivalent capability in pyfaidx?