gui11aume / starcode

All pairs search and sequence clustering
GNU General Public License v3.0
90 stars 21 forks source link

First draft of "pystarcode" module #20

Closed rcortini closed 6 years ago

rcortini commented 6 years ago

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 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

More features to be added in the future:

rcortini commented 6 years ago

@gui11aume thanks, I fixed this issue.