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:
counts: associates the sequence of a canonical to its counts
d: associates the sequences of the list to its canonical.
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 the starcode 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 a gstack_t stack as input, and returns a gstack_t function as output.
Limitations
At the moment, output of the pystarcode.starcode function is limited to the one when using the mp clustering method.
TODO
Immediate
Write proper documentation of the starcode method
Testing of Starcode (did the modifications break anything?)
Check the origin of memory leaks in the main
Implement the output for other clustering algorithms
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: