<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for binary|fusion</title>
	<atom:link href="http://adamcoster.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://adamcoster.com</link>
	<description>ramblings of a fetal biologist</description>
	<lastBuildDate>Tue, 21 Feb 2012 03:01:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>Comment on Python: Clean up and translate nucleotide sequences by adamcoster</title>
		<link>http://adamcoster.com/2011/01/13/python-clean-up-and-translate-nucleotide-sequences/#comment-1017</link>
		<dc:creator><![CDATA[adamcoster]]></dc:creator>
		<pubDate>Tue, 21 Feb 2012 03:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=1009#comment-1017</guid>
		<description><![CDATA[Oooh, nice catch! I&#039;ve added those quotes.

Now, the translation code:
&lt;code&gt;
return &#039;&#039;.join([gencode.get(sequence[3*i:3*i+3],&#039;X&#039;) for i in range(len(sequence)//3)])
&lt;/code&gt;

Okay, so the sep.join(string_list) part just takes whatever strings are in the list string_list and sticks them together with the string sep in between each. That list, in this case, is of each of the translated codons.

The codon list comes from the &lt;a href=&quot;http://www.secnetix.de/olli/Python/list_comprehensions.hawk&quot; rel=&quot;nofollow&quot;&gt;list comprehension&lt;/a&gt;, which loops through each of the calculated number of codons len(sequence)//3. At each iteration, it indexes sequence to pull out a 3-letter subsequence. That codon is then used as a key to the gencode dictionary to find the corresponding amino acid.

I hope that clarified things a little. The trick is really the list comprehension, which is a pretty awesome thing that Python can do that isn&#039;t available in other languages.]]></description>
		<content:encoded><![CDATA[<p>Oooh, nice catch! I&#8217;ve added those quotes.</p>
<p>Now, the translation code:<br />
<code><br />
return ''.join([gencode.get(sequence[3*i:3*i+3],'X') for i in range(len(sequence)//3)])<br />
</code></p>
<p>Okay, so the sep.join(string_list) part just takes whatever strings are in the list string_list and sticks them together with the string sep in between each. That list, in this case, is of each of the translated codons.</p>
<p>The codon list comes from the <a href="http://www.secnetix.de/olli/Python/list_comprehensions.hawk" rel="nofollow">list comprehension</a>, which loops through each of the calculated number of codons len(sequence)//3. At each iteration, it indexes sequence to pull out a 3-letter subsequence. That codon is then used as a key to the gencode dictionary to find the corresponding amino acid.</p>
<p>I hope that clarified things a little. The trick is really the list comprehension, which is a pretty awesome thing that Python can do that isn&#8217;t available in other languages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Python: Clean up and translate nucleotide sequences by Robert</title>
		<link>http://adamcoster.com/2011/01/13/python-clean-up-and-translate-nucleotide-sequences/#comment-1015</link>
		<dc:creator><![CDATA[Robert]]></dc:creator>
		<pubDate>Sun, 19 Feb 2012 22:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=1009#comment-1015</guid>
		<description><![CDATA[Hi there,
I am impressed with what you show here, but I don&#039;t understand it completely (I am totally new to python &amp; programming). First of all, did you forget a column of &#039; as the first one in your dictionary?
And could you please explain the code that is supposed to translate the base sequence to me?
I wrote a little script to calculate the tm of primers, now I want to write one to translate dna. But how do I print the function &#039;translate&#039; which you defined. I always the output [1,2,3] &#039;X&#039; when I try the script with three bases.

Cheers, R]]></description>
		<content:encoded><![CDATA[<p>Hi there,<br />
I am impressed with what you show here, but I don&#8217;t understand it completely (I am totally new to python &amp; programming). First of all, did you forget a column of &#8216; as the first one in your dictionary?<br />
And could you please explain the code that is supposed to translate the base sequence to me?<br />
I wrote a little script to calculate the tm of primers, now I want to write one to translate dna. But how do I print the function &#8216;translate&#8217; which you defined. I always the output [1,2,3] &#8216;X&#8217; when I try the script with three bases.</p>
<p>Cheers, R</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on LabTeX by adamcoster</title>
		<link>http://adamcoster.com/2011/04/11/labtex/#comment-914</link>
		<dc:creator><![CDATA[adamcoster]]></dc:creator>
		<pubDate>Tue, 01 Nov 2011 10:45:39 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=1174#comment-914</guid>
		<description><![CDATA[Thanks for the suggestion!]]></description>
		<content:encoded><![CDATA[<p>Thanks for the suggestion!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on LabTeX by Luis</title>
		<link>http://adamcoster.com/2011/04/11/labtex/#comment-913</link>
		<dc:creator><![CDATA[Luis]]></dc:creator>
		<pubDate>Tue, 01 Nov 2011 02:52:43 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=1174#comment-913</guid>
		<description><![CDATA[WEll if you are making an electronic lab notebook. I would try ElnTeX or along those lines. ETex, stay away from calling it BioTex because it might move people away. ELNTeX would be a good name because it is general enough.]]></description>
		<content:encoded><![CDATA[<p>WEll if you are making an electronic lab notebook. I would try ElnTeX or along those lines. ETex, stay away from calling it BioTex because it might move people away. ELNTeX would be a good name because it is general enough.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Python: shared birthdays by Sam Coster</title>
		<link>http://adamcoster.com/2011/07/13/python-shared-birthdays/#comment-864</link>
		<dc:creator><![CDATA[Sam Coster]]></dc:creator>
		<pubDate>Mon, 08 Aug 2011 17:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://adamcoster.com/?p=1189#comment-864</guid>
		<description><![CDATA[That&#039;s pretty damn sweet. We did this on the first day of stats class as one of those &#039;BLOW YOUR MIND WITH KNOWLEDGE&#039; intros, though I think our class was weird because we had three people with the same birthday, in a group of about 40.]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s pretty damn sweet. We did this on the first day of stats class as one of those &#8216;BLOW YOUR MIND WITH KNOWLEDGE&#8217; intros, though I think our class was weird because we had three people with the same birthday, in a group of about 40.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

