<?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/"
		>
<channel>
	<title>Comments on: Short bioinformatics hacks, ch. 2: chunk it.</title>
	<atom:link href="http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/</link>
	<description>The musings and ravings of a computational biologist about science, computers, music and, you know, stuff</description>
	<lastBuildDate>Sat, 05 May 2012 18:13:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: vaibhav asthana</title>
		<link>http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/comment-page-1/#comment-470</link>
		<dc:creator>vaibhav asthana</dc:creator>
		<pubDate>Thu, 11 Jun 2009 22:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://bytesizebio.net/?p=1349#comment-470</guid>
		<description>must have a look, and plz pass ur review and comments on this site on bioinformatics http://bionet.awardspace.info/index.html</description>
		<content:encoded><![CDATA[<p>must have a look, and plz pass ur review and comments on this site on bioinformatics <a href="http://bionet.awardspace.info/index.html" rel="nofollow">http://bionet.awardspace.info/index.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gioby</title>
		<link>http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/comment-page-1/#comment-461</link>
		<dc:creator>gioby</dc:creator>
		<pubDate>Mon, 08 Jun 2009 12:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://bytesizebio.net/?p=1349#comment-461</guid>
		<description>Well, I would also add some good documentation and at least one doctest to your scripts.
Moreover, speaking of bioinformatics tips, I would put at least an example to a makefile :-)</description>
		<content:encoded><![CDATA[<p>Well, I would also add some good documentation and at least one doctest to your scripts.<br />
Moreover, speaking of bioinformatics tips, I would put at least an example to a makefile <img src='http://bytesizebio.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gioby</title>
		<link>http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/comment-page-1/#comment-460</link>
		<dc:creator>gioby</dc:creator>
		<pubDate>Mon, 08 Jun 2009 12:11:38 +0000</pubDate>
		<guid isPermaLink="false">http://bytesizebio.net/?p=1349#comment-460</guid>
		<description>I suggest you to install biopython with easy_install, rather than with the package manager from your distribution.
The egg on pypi is usually more up-to-date, moreover easy_install can work in any operating system.
Usually easy_install is included in the package python-setuptools in debian.

$: sudo apt-get install python-setuptools
$: sudo easy_install biopython</description>
		<content:encoded><![CDATA[<p>I suggest you to install biopython with easy_install, rather than with the package manager from your distribution.<br />
The egg on pypi is usually more up-to-date, moreover easy_install can work in any operating system.<br />
Usually easy_install is included in the package python-setuptools in debian.</p>
<p>$: sudo apt-get install python-setuptools<br />
$: sudo easy_install biopython</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Iddo</title>
		<link>http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/comment-page-1/#comment-451</link>
		<dc:creator>Iddo</dc:creator>
		<pubDate>Tue, 02 Jun 2009 01:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://bytesizebio.net/?p=1349#comment-451</guid>
		<description>Hi Peter: enumerate will start n at 0, I need it at 1.  I could do:




&lt;blockquote&gt;
for i, seq_record in enumerate(SeqIO.parse(infile, seq_format)):
&#160; &#160;&#160; &#160; n = i+1  #continue to use n as before
    .
    .
    .

&lt;/blockquote&gt;

But to me, that is less clear than what I am doing right now.



close output handles: good point

explicit divide: you mean I am not working in Python 1.5 anymore? Good point. 

SeqRecord: D&#039;oh!

I&#039;ll fix this soon, based on your suggestions. Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Peter: enumerate will start n at 0, I need it at 1.  I could do:</p>
<blockquote><p>
for i, seq_record in enumerate(SeqIO.parse(infile, seq_format)):<br />
&nbsp; &nbsp;&nbsp; &nbsp; n = i+1  #continue to use n as before<br />
    .<br />
    .<br />
    .</p>
</blockquote>
<p>But to me, that is less clear than what I am doing right now.</p>
<p>close output handles: good point</p>
<p>explicit divide: you mean I am not working in Python 1.5 anymore? Good point. </p>
<p>SeqRecord: D&#8217;oh!</p>
<p>I&#8217;ll fix this soon, based on your suggestions. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Cock</title>
		<link>http://bytesizebio.net/index.php/2009/06/01/short-bioinformatics-hacks-ch-2-chunk-it/comment-page-1/#comment-450</link>
		<dc:creator>Peter Cock</dc:creator>
		<pubDate>Mon, 01 Jun 2009 21:12:08 +0000</pubDate>
		<guid isPermaLink="false">http://bytesizebio.net/?p=1349#comment-450</guid>
		<description>Hi Iddo,

Nice post!

I hope you don&#039;t mind if I nit pic, and point out a few minor things you could improve:

(1) Use enumerate(...) to keep track of the record number index (n), rather than incrementing it in the loop. This is just a style thing.

(2) Close your output handles with a couple of fout.close() statements. This should be happening for you behind the scenes when the script finishes, but it is good practice.

(3) Use an explicit integer divide (n//chunk_size rather than n/chunk_size). Good practice looking ahead to Python 3.

(4) You don&#039;t actually need to import the SeqRecord class in this example.

Peter</description>
		<content:encoded><![CDATA[<p>Hi Iddo,</p>
<p>Nice post!</p>
<p>I hope you don&#8217;t mind if I nit pic, and point out a few minor things you could improve:</p>
<p>(1) Use enumerate(&#8230;) to keep track of the record number index (n), rather than incrementing it in the loop. This is just a style thing.</p>
<p>(2) Close your output handles with a couple of fout.close() statements. This should be happening for you behind the scenes when the script finishes, but it is good practice.</p>
<p>(3) Use an explicit integer divide (n//chunk_size rather than n/chunk_size). Good practice looking ahead to Python 3.</p>
<p>(4) You don&#8217;t actually need to import the SeqRecord class in this example.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

