Open
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. |
Collaborator
|
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? |
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainwas modified so that all the calculations on the sequences are performed by thestarcodefunction. The argument parsing, the compatibility between the input flags, and the output of the program were transferred to separate functions.The
starcodefunction now accepts agstack_tstack as input, and returns agstack_tfunction as output.Limitations
At the moment, output of the
pystarcode.starcodefunction is limited to the one when using thempclustering method.TODO
Immediate
starcodemethodMore features to be added in the future: