Differences

This shows you the differences between two versions of the page.

part12 [2009/05/20 11:40]
nuin created
part12 [2009/05/20 11:41] (current)
nuin
Line 61: Line 61:
A long time ago when the site was still based on the Perl book we have seen [[http://python.genedrift.org/2007/01/23/transcribing-the-other-way/" | how to transcribe DNA to RNA]]. This entry serves only to remember the method and add a function to the fasta module in the repository. A long time ago when the site was still based on the Perl book we have seen [[http://python.genedrift.org/2007/01/23/transcribing-the-other-way/" | how to transcribe DNA to RNA]]. This entry serves only to remember the method and add a function to the fasta module in the repository.
-It is really simple to transcribe in Python, by employing the <code>replace</code> method on strings. Our function looks like+It is really simple to transcribe in Python, by employing the //replace// method on strings. Our function looks like
-<code python?def transcribe(seq):+<code python>def transcribe(seq):
    RNA = seq.replace('T', 'U')     RNA = seq.replace('T', 'U')
    return RNA</code>     return RNA</code>
 
part12.txt · Last modified: 2009/05/20 11:41 by nuin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki