[Biopython] python advice needed

Téletchéa Stéphane stephane.teletchea at inserm.fr
Wed Apr 16 08:38:40 EDT 2014


Le 15/04/2014 16:58, Csaba Kiss a écrit :
> Hi!
> I need some advice how to get better in python. I have written a 
> software package to analyze antibody deep sequencing data. This was my 
> first experience with python and I am not a programmer. The end result 
> works, however, if a professional coder looks at the scripts, it is 
> obvious that it was written by an amateur. I am planning to re-write 
> the code into a better format that is extendable and more user and 
> coder friendly. At the moment the script only relies on biopython to 
> get the sequences and quality values out of sff and fastq files, the 
> rest is custom written. I would like to rely more on biopython and 
> also perhaps extend biopython with new features.
> The problem I am having is object oriented python and classes. I 
> understand the concept of both, but it's completely different to 
> actually use it. I would like to ask help from scientist who are in a 
> similar situation, as myself. I am a molecular biologist with interest 
> in coding, but little background. Do you have any good tutorials books 
> about python classes and OOP? For example, when I learned python I 
> found the Google python class, extremely valuable. I practically 
> looked at the videos and solved the problems and that sent me on my 
> way to python:
> https://developers.google.com/edu/python/?csw=1
>
> Any help would be appreciated:
> Csaba
>

Dear Csaba,

Being a bioinformatics teacher, I would first say that your code should 
first work :-)

Second, in order to get another version of your code, as mentioned 
earlier, you should use
a git-like versioning control tool (git or any other, git tends to be 
popular).

Third, concerning python itself, I would recommend following the "PEP8" 
recommandations:
http://legacy.python.org/dev/peps/pep-0008/

(I also found this page while searching for PEP8 -> 
http://docs.python-guide.org/en/latest/writing/style/)

And last, since we are using biopython, check how biopython is 
implemented (for example):
https://github.com/biopython/biopython/blob/master/Bio/AlignIO/Interfaces.py

Best,
Stéphane

-- 
Equipe DSIMB - Dynamique des Structures et
des Interactions des Macromolécules Biologiques
INTS, INSERM-Paris-Diderot UMR_S 1134
6 rue Alexandre Cabanel - 75739 Paris cedex 15 - France
Tél : +33 144 493 057
Fax : +33 147 347 431
http://www.dsimb.inserm.fr - http://www.steletch.org



More information about the Biopython mailing list