糖心TV

Skip to main content Skip to navigation

Peter's Python Programming Pages

These pages are no longer being updated, and unless otherwise stated were for Python 2; If you have any queries please contact Peter via his alumni email address or Google Mail.

is a freely available programming language, available on Windows, Linux and MacOS. There is a , and I have found searching on for specific questions very handy.

Biopython

is an add-on module which provides support for lots of Bioinformatic work:

  • Dealing with numerous forms of biological data (including Fasta and Genbank sequence files, and PDB structure files).
  • Handy functions like translating nucleotide sequences into amino acids.
  • Calling (standalone) to search for sequence matches.
  • Calling (standalone) to do alignments.

I started using Biopython in 2004 for my PhD, and then began contributing to the project. By the end of my PhD I was one of the core developers and was lead author on the Biopython application note publication. Why not have a look at the , or some of my examples.

On a related note, Thomas Mailund's module is very handy for dealing with phylogenetic trees. This file format is used by used by PHYLIP, TREE-PUZZLE, PROTML, and several other programs including Clustal. Biopython 1.30 did not include any code for dealing with tree files - but check out the new Nexus module in BioPython 1.40b onwards from Frank Kauff and Cymon Cox, which is a nice alternative.

The Molecular Modelling Toolkit (MMTK)

is a python library providing a range of tools for molecular simulations (the numerically intensive parts are actually written C for speed).

MMTK also has visualisation capabilities, including the ability to use or for output. I wrote an example now included in MMTK which loads a file of insulin and displays it using a space filling model.

I did some work with MMTK for my second MOAC MSc mini-project, and wrote a good chunk of the .

RPy (R from Python)

R is a language and environment for statistical computing and graphics, available for free from . R's rich libraries for statistics and graph creation can be called from within a Python program using , and is used in several of my examples below.

See also my R programming pages.

Examples

Here are some Python examples I have written and chosen to share:


Search my python pages:


 


 


 


 


 


Let us know you agree to cookies