[Biopython-dev] pypaml
Brad Chapman
chapmanb at 50mail.com
Wed Feb 23 13:11:51 UTC 2011
Brandon;
> I've been toiling away on the PAML API and I think it's finally ready
> for review. If anyone's willing to give my code a review, here's my
> branch:
> https://github.com/brandoninvergo/biopython/tree/paml-branch
This is awesome; thanks much for all the work getting this together.
It's really great to see the extensive tests. I'm also impressed
with your story of porting over 'goto' statements; it's been a while
since those have entered my mind:
10 PRINT "CHI SQUARE FOREVER"
20 FLASH
30 GOTO 10
A couple of more general thoughts about your code:
- These looks to be a lot of shared functionality between codeml,
baseml and yn00 in setting up the control files. Would it be
possible to create a base class that these all inherit from? This
would make the code much easier to maintain over time as formats
change.
- Your 'read' functions get pretty deeply nested, especially the
codeml parser. What do you think about creating an internal class
to split some of the parsing logic into individual functions? A
nice example is the GenBank/Scanner.py code. Having functions like
parse_header/parse_features makes it much easier for someone not
deeply familiar with your code to start to make guesses at where
different functionality exists. This way, if the format changes
others can provide patches and feedback to you.
Overall this is great and all the work is much appreciated.
Brad
More information about the Biopython-dev
mailing list