-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyStarcode #21
base: master
Are you sure you want to change the base?
PyStarcode #21
Conversation
@rcortini I think this was an excellent idea. It's been a while so I'm not sure how much interest is remaining to complete this. But I think it'll be nice to have. |
I wonder how much work it would be to port this to Python 3. @rcortini any insight on this? Why didn't we merge this in the first place? Does anyone remember? |
Hi All, there's indeed quite a lot of work to do, because to get this to run I had to extensively modify the logics of the main routines of starcode. After that, there were major changes upstream, so this current PR doesn't have any hope of working. I'd have to look at it again from scratch. |
This PR includes the first draft of a python module with Starcode functionality, named
pystarcode
.The module has only one function,
starcode
. The function takes as input a Python list of sequences (as strings), the required maximum distance argument, and returns two dictionaries:The idea is that the user will parse a file and obtain a list of sequences on their own. Then the output dictionaries can be used for calculations on those input sequences.
Techincal details
The module uses the Python C API (for python 2.7). The Starcode
main
was modified so that all the calculations on the sequences are performed by thestarcode
function. The argument parsing, the compatibility between the input flags, and the output of the program were transferred to separate functions.The
starcode
function now accepts agstack_t
stack as input, and returns agstack_t
function as output.Limitations
At the moment, output of the
pystarcode.starcode
function is limited to the one when using themp
clustering method.TODO
Immediate
starcode
methodMore features to be added in the future: