Closed daveuu closed 7 years ago
OK! I just tried:
parasail.nw_stats_table_striped_16(A, B, open_pen, extend_pen, parasail.pam100)
And the output is making more sense now:
In [14]: result.score_table
Out[14]:
array([[ 5, -6, -7, -8],
[-6, 10, -1, -2],
[-7, -1, 11, 0],
[-8, -2, 0, 12],
[-9, -3, 3, 5]], dtype=int32)
I guess the non-table, non-stats version of the function is returning uninitiated/empty tables regardless?
Looks like you figured it out faster than I could reply to your first message. Yes, the non-table versions of the functions do not populate that table memory and you're getting garbage. I'm surprised it isn't causing a segmentation fault. Two solutions, 1) better documentation, and/or 2) return None if indeed there shouldn't be a score table.
I'm glad you figured it out! Also glad that's finally working in both py2 and py3. This was my first attempt at a project available via pip, and my first venture into a py3 library.
I hope this library will be useful to you.
The documentation for the main library is perfectly clear with respect to the function names and whether to expect tables etc. But ideally both those solutions (one really just being adapt existing documentation from main parasail library). Cheers!
(ultimately I'm looking to generate the aligned sequences for moving window calculations but that is addressed in the comment to the other issue)
Testing
parasail.nw_striped_16()
gives a differentresult.score_table()
each time:The connection between the Python reference and the actual result seems to disappear when returned within IPython (unless I'm very confused):