Getting Started
(Difference between revisions)
(Initial page creation modeled off of equivalent page for bioperl) |
(→Quick example: added output) |
||
| Line 11: | Line 11: | ||
==Quick example== | ==Quick example== | ||
| + | Executing this: | ||
<python> | <python> | ||
from Bio.Seq import Seq,translate | from Bio.Seq import Seq,translate | ||
| − | |||
#create a sequence object of some DNA | #create a sequence object of some DNA | ||
| Line 23: | Line 23: | ||
#or see the whole record | #or see the whole record | ||
| − | print my_seq | + | print 'sequence record:', my_seq |
#translate the sequence into a protein | #translate the sequence into a protein | ||
| Line 29: | Line 29: | ||
print 'protein translation is %s' % my_protein.tostring() | print 'protein translation is %s' % my_protein.tostring() | ||
| − | print my_protein | + | print 'protein record:', my_protein |
</python> | </python> | ||
| + | |||
| + | Produces: | ||
| + | <pre> | ||
| + | seq is 11 bases long | ||
| + | reverse complement is CTATCTACATG | ||
| + | sequence record: Seq('CATGTAGATAG', Alphabet()) | ||
| + | protein translation is HVD | ||
| + | protein record: Seq('HVD', HasStopCodon(IUPACProtein(), '*')) | ||
| + | </pre> | ||
==Beginners== | ==Beginners== | ||
Revision as of 21:39, 19 January 2007
--Jblucks 16:36, 19 January 2007 (EST): This page modeled after the one for bioperl
Contents |
Download
See Getting BioPerl
Installation
Quick example
Executing this:
from Bio.Seq import Seq,translate #create a sequence object of some DNA my_seq = Seq('CATGTAGATAG') #print out some details about it print 'seq is %i bases long' % len(my_seq) print 'reverse complement is %s' % my_seq.reverse_complement().tostring() #or see the whole record print 'sequence record:', my_seq #translate the sequence into a protein my_protein = translate(my_seq) print 'protein translation is %s' % my_protein.tostring() print 'protein record:', my_protein
Produces:
seq is 11 bases long
reverse complement is CTATCTACATG
sequence record: Seq('CATGTAGATAG', Alphabet())
protein translation is HVD
protein record: Seq('HVD', HasStopCodon(IUPACProtein(), '*'))
Beginners
- Learn how to program in Perl, see several Tutorials
- Read the Template:HOWTO
- Browse the Bioperl Tutorial
- Examine the Class Diagram if you'd like to know more about the relationships between the modules.
Further reading
- Read the other HOWTOs
- Use the Wiki Search tools to find more information on specific topics.