Repository navigation
Conversation
|
Hi guys, any news on when the new version will be incorporated in the official biopython? how stable is this version? Do you need help in testing it? |
|
Having someone else test this and give feedback would be really helpful. Would you need any help with that @OxanaSachenkova - e.g. how to get this code installed? You'd need to checkout this branch using git and install Biopython from source. Feel free to ask about that on the Biopython development mailing list, so we can keep this pull request focussed on the code changes. Thanks! |
|
It could be possible to add the result of two (or more) restriction enzyme combinations? |
|
Analyses are just mappings of enzymes to lists of cut points, so they can be merged by |
|
I'm not really qualified to help with this project, butI do use the restriction module frequently and have a few questions. 1 - Is it possible to add restriction enzymes? I'd like to add some homing endonucleases from NEB (i.e. http://rebase.neb.com/rebase/enz/I-SceI.html), but they don't seem to import with the regular restriction enzymes. 2 - If the restriction module is being updated, will it be possible to pass restriction names in as parameters? Currently you have to import each enzyme, which doesn't seem very pythonic. For instance, if I have a list of restriction enzymes that I want to use in my script, I currently have to use and exec statement, which feels weird. Has there been any thought to adding a function that could be used instead, such as Restriction.cut('EcoRI', seqrecord)? |
|
I think @mwbudde raised some good points. On a more technical level, here are my thoughts on an initial code-review. The new We're trying to use PEP8 compliant names for new modules (lower case), however due to the pre-existence of Furthermore you could rename Rather than defining variables In the REBASE code, you cannot use I'm not entirely comfortable with import the module automatically (and silently) trying to download the REBASE files... Crucially, there are no examples (or unit tests which we would need but can come later). How do I actually create an instance of a specific restriction enzyme, e.g. EcoRI, and then cut a sequence? |
|
Also the new module needs to be added to I had a little play with some of this on a personal branch https://github.com/peterjc/biopython/tree/digest but got stuck actually trying to use the code :( |
|
I have stopped using biopython so won't do additional work on this PR, but am happy to share my thoughts. Re: Adding new enzymes Arguably, this could be made slightly easier with a Re: Using restriction names (a very good idea): the Re: The Seq class: AFAICT I have removed the new Seq class (thus the reliance on an or, for a single enzyme, Re: Module name: A good idea, the current design basically came from the old Re: _codes and _complement: Feel free to fix this. Re: REBASE and autoloading: Yes, this is a poor design. The intent was that I don't really intend to write more code on that but let me know if I can be of additional help. |
|
Thanks for those comments @anntzer - more food for thought :) |
|
Multiple: Avoid the legal grey area about the REBASE files by downloading them either at install time or usage. Avoid what where with hindsight poor design choices in current implementation (overly complex implementation with classes for every enzyme which also hampers auto-generated documentation, and use of one-based counting rather than Python counting). |
|
It would be nice to get this into the next Biopython release. |
|
Replacing the restriction digest module is a worthy goal. However, I feel Biopython 1.82 is already over due but ready to release - so wouldn't want to delay it any more. |
|
Note sure wny there is a git merge conflict. Relatively minor things: I'd change this to use PEP8 lower case module names, perhaps More importantly, it would need some unit tests - the old module's ought to be a good guide. |
|
I'll close this as I have little interest in reviving a 9y old PR; feel free to take over the code as desired. |
|
Yes, I do agree. |
|
Thank you! |
This supersedes #148. I created a new branch so that the emboss db doesn't appear in the history (and also to restart from the current master). Now, importing the library will have the side-effect of dowloading the db. Note, though, that setup.py may need to be modified so that the db is present before biopython is written to a directory owned by root (probably just an import is enough, but untested).
I also got rid of the custom Seq class, now I just rely on the standard Seq and pass circular as a kwarg.
Finally, I removed the patch for the old restriction library as it doesn't seem to apply cleanly and I have little interest in figuring out why -- but you can still get it from #148 and give it a try.