[Biopython-dev] hmmpfam parser

Brad Chapman chapmanb at uga.edu
Wed Feb 4 19:04:53 EST 2004

Hi Wagied;

> ExPfam is code donated by Joanne Adamkewicz at Exelixis. I guess
> they use it at the "module" level rather than at the class level.

Okay. Thanks makes more sense now. This would need a bit of work to
be "Biopython-like." It does do a good job of solving a particular
problem, but normally we try to focus the code that gets in on being
as broadly applicable as possible (hence the emphasis on parsers and
iterators and the like).

> The record/entry structurs are ideally collected in a hash...let me
> check the code..will write than in!

I'm not sure what exactly you mean here. What does this refer to?

> I can write in an Iterator object to traverse the records, if that is
> necessary.

It would be really nice to have -- I think the most common usecase
(at least in my experience with hmmpfam) is to have a file full of
searches that need to be parsed out. It would really expand the
useability of the code.

> Mmhhh you noticed.-..the Java-like coding....I generally try to prevent 
> direct access of class instance variables, rubbed off from Java.

Yes, this really isn't necessary in Biopython. It isn't terrible to
have (in addition to direct attribute access), but does require extra 
work coding all those functions up. Generally, the Python viewpoint
on this is that you "trust" users of your code to access the
variables correctly. Compared to Java coders we tend to be a bit
more easygoing about that sort of thing.

> Made the releveant changes you suggested. 
> Here it is again:
> Please don't hesitate to ask any other questions!

Thanks -- this does clear up a few things. Not to be a pain, but
there are a few things I mentioned before that are still present in
the code you sent:

1. Function names are still in thisStyle instead of this_style. This
is the most serious problem, as it really helps to have consistent
naming conventions throughtout the Biopython codebase -- as much as

2. An iterator -- as I mentioned before, this would really improve
the usability of the code.

3. All the ';'s in the code. This is a more minor gripe, but poor
python programmers aren't used to looking at those. A search/replace
on them will likely get rid of them all and make it look much nicer.

I'd be very happy to check it in with those changes.

> I was thinking of becoming a developer, will need to go thru biopython's
> coding
> guidelines. If I could be added to the developers list, would be great!

Definitely. The participants page is at:


This is editable on the web (with username 'biopython' and password
'user'). I'd encourage you to enter your information there (just
sign in, click 'edit this page' then 'add new') and be included.
We are all about giving credit to the people that contribute (as
these are the people that make it happen :-).

Thanks again for the continued work!

More information about the Biopython-dev mailing list