You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can with C parasail library. I hadn't updated the python bindings yet. I started toying with it, but even the C API wasn't pretty. For the C library, it was important to me to keep the function signature the same whether it was a normal substitution matrix versus pssm. Keeping the signature the same allowed me to not need to create pssm-specific APIs and essentially double the number of functions. So in the C library, you pass NULL for the first sequence since it is encapsulated by the pssm matrix. And to make it worse, if you want to use any of the "stats" functions, you still have to pass in a representative sequence for s1. It's awkward and clunky but it works.
I don't know how to make the python bindings better or more pythonic. Suddenly the first argument to the alignment functions becomes optional.
# the current alignment signaturedefsw(s1, s2, open, extend, matrix):
pass# keeping names the same, but allowing s1 to be optionaldefsw(*args):
iflen(args) ==4:
pass# call PSSMeliflen(args) ==5:
pass# call normalelse:
raiseTypeError("Wrong number of arguments!")
# or going the clunk way I did it in Cdefsw(s1, s2, open, extend, matrix):
# s1 is None, and make this okay# currently, the wrapper just passes s1 and len(s1) down to the C API, # so I'd need to add a check for None
Your thoughts? Help me design the python PSSM API.
Can you align a PSSM using parasail-python?
Thanks!
The text was updated successfully, but these errors were encountered: