Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Biopython
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Sequences === A core concept in Biopython is the biological sequence, and this is represented by the <code>Seq</code> class.<ref name="Tutorial">{{Citation |last1=Chang |first1=Jeff |last2=Chapman |first2=Brad |last3=Friedberg |first3=Iddo |last4=Hamelryck |first4=Thomas |last5=de Hoon |first5=Michiel |last6=Cock |first6=Peter |last7=Antao |first7=Tiago |last8=Talevich |first8=Eric |last9=Wilczynski |first9=Bartek |title=Biopython Tutorial and Cookbook |url=http://biopython.org/DIST/docs/tutorial/Tutorial.html |date=29 May 2014 |accessdate=28 August 2014}}</ref> A Biopython <code>Seq</code> object is similar to a Python string in many respects: it supports the Python slice notation, can be concatenated with other sequences and is immutable. In addition, it includes sequence-specific methods and specifies the particular biological alphabet used. <syntaxhighlight lang="pycon"> >>> # This script creates a DNA sequence and performs some typical manipulations >>> from Bio.Seq import Seq >>> dna_sequence = Seq("AGGCTTCTCGTA", IUPAC.unambiguous_dna) >>> dna_sequence Seq('AGGCTTCTCGTA', IUPACUnambiguousDNA()) >>> dna_sequence[2:7] Seq('GCTTC', IUPACUnambiguousDNA()) >>> dna_sequence.reverse_complement() Seq('TACGAGAAGCCT', IUPACUnambiguousDNA()) >>> rna_sequence = dna_sequence.transcribe() >>> rna_sequence Seq('AGGCUUCUCGUA', IUPACUnambiguousRNA()) >>> rna_sequence.translate() Seq('RLLV', IUPACProtein()) </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)