[Biopython-dev] Contribution -- NMR xpk files

Brad Chapman chapmanb at uga.edu
Wed Dec 17 13:29:32 EST 2003

Hi Robert;

> I would like to contribute some tools that I have developed to the
> biopython project.

Great! We definitely always welcome contributions.

> Among them are programs for analyzing NMR data as well
> as modules suited for more general problems of handling resonance
> assignment data.

I will admit straightaway that I know next to nothing about
structural data, so I won't be able to make any comments about the
actual work the code is doing (Heh. Predict NOEs -- I don't even
know what an NOE that I got predicted is. Heh.). But I can make
comments at least from the style and usability aspects and others
who know about structural data can help me out.

The first major point is that most things in Biopython are organized
as modules that can be called from other functions. From looking at
your code (and not really understanding structural things) it looks
like the two major things the code does are deal with the xpk files
and then do the NOE prediction.

If I am on target, then it might be best to organize your code as a
couple of modules under Bio.NMR, called something like xpktools.py
and NOEPredict.py or something similar. This way the
predictnoe.py script can call the useful functions from these
modules, and they can also be reused from other people's scripts. If
structural people have other ideas about where this functionality
should be located, please chime in.

The second point is that I noticed just on rapid examination that
some class and function names don't conform to the Biopython style
guide that we use. Specifically, classes are normally named in
AllFirstLetterUppercase style, and internal functions (those that
aren't meant to be called from other scripts using the modules) are
differentiated with _underscores_in_front. Jeff wrote up a nice
guide about contributing to Biopython which has these points and
additional info:


But yeah, after all that -- we definitely would like to have your
code as it doesn't (to my knowledge) duplicate anything we already
have in Biopython. To sum up my major suggestions would be to:

1. Read over the contribution and style guide for the code.
2. Organize the functionality as modules and make it clear by
underscores or some other method which functions are meant to be
called by other modules.
3. Have the example script use the modules as an example.
4. Make sure you are willing to put your code under the Biopython

Thanks for your mail and the code!

More information about the Biopython-dev mailing list