Getting Started
(→Reading and writing Sequence Files: Bio.SeqIO isn't really new anymore. Also link to AlignIO page) |
(→Beginners: Added educational PLoS paper on Biopython.) |
||
| Line 50: | Line 50: | ||
** [http://rgruet.free.fr/PQR25/PQR2.5.html Python Quick Reference] | ** [http://rgruet.free.fr/PQR25/PQR2.5.html Python Quick Reference] | ||
* Browse the [http://biopython.org/DIST/docs/tutorial/Tutorial.html Biopython Tutorial] | * Browse the [http://biopython.org/DIST/docs/tutorial/Tutorial.html Biopython Tutorial] | ||
| + | * Read this paper <biblio>Bassi2007 pmid=18052533</biblio> | ||
* Examine the [http://biopython.org/DIST/docs/api Class Diagram] if you'd like to know more about the relationships between the modules. | * Examine the [http://biopython.org/DIST/docs/api Class Diagram] if you'd like to know more about the relationships between the modules. | ||
Revision as of 18:54, 27 March 2009
Contents |
Download and Installation
For Windows we provide click-and-run installers. Most Linux distributions will include an optional Biopython package (although this may be out of date). Otherwise you typically download and uncompress the archive, and install from source. See our downloads page for details including the prerequisites.
You can check your installation has worked at the python prompt:
>>> import Bio
If that gives no error, you should be done. If you get something like "ImportError: No module named Bio" something has gone wrong.
Tutorial
The Biopython Tutorial and Cookbook (HTML, PDF) contains the bulk of our documentation. See Documentation for more links.
Quick example
Try executing this in python:
from Bio.Seq import Seq #create a sequence object my_seq = Seq('CATGTAGACTAG') #print out some details about it print 'seq %s is %i bases long' % (my_seq, len(my_seq)) print 'reverse complement is %s' % my_seq.reverse_complement() print 'protein translation is %s' % my_seq.translate()
You should get the following output:
seq CATGTAGACTAG is 12 bases long reverse complement is CTAGTCTACATG protein translation is HVD*
This was a very quick demonstration of Biopython's Seq (sequence) object and some of its methods.
Reading and writing Sequence Files
Use the SeqIO module for reading or writing sequences as SeqRecord objects. For multiple sequence alignment files, you can alternatively use the AlignIO module.
Beginners
- Learn how to program in Python
- Browse the Biopython Tutorial
- Read this paper
- Bassi S. A primer on python for life science researchers. PLoS Comput Biol 2007 Nov; 3(11) e199. doi:10.1371/journal.pcbi.0030199 pmid:18052533.
- Examine the Class Diagram if you'd like to know more about the relationships between the modules.
Further reading
- Use the Wiki Search tools to find more information on specific topics.