<div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,</div><div class="gmail_default" style="font-size:small">Very nice book!</div><div class="gmail_default" style="font-size:small">I you run the welcome link through nbviewer, the links work:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style=""><a href="http://nbviewer.ipython.org/github/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb">http://nbviewer.ipython.org/github/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb</a><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style=""><br></div><div class="gmail_default" style="">/bjorn</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 9, 2015 at 4:29 AM,  <span dir="ltr">&lt;<a href="mailto:biopython-request@mailman.open-bio.org" target="_blank">biopython-request@mailman.open-bio.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Biopython mailing list submissions to<br>
        <a href="mailto:biopython@mailman.open-bio.org">biopython@mailman.open-bio.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:biopython-request@mailman.open-bio.org">biopython-request@mailman.open-bio.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:biopython-owner@mailman.open-bio.org">biopython-owner@mailman.open-bio.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of Biopython digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Bioinformatics with Python cookbook (Iddo Friedberg)<br>
   2. Re: Bioinformatics with Python cookbook (Wibowo Arindrarto)<br>
   3. Entrez EFetch Options (Zach Gayk)<br>
   4. Re: Bioinformatics with Python cookbook (Chris Mitchell)<br>
   5. Re: Entrez EFetch Options (Joshua Klein)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 8 Jul 2015 13:02:37 -0500<br>
From: Iddo Friedberg &lt;<a href="mailto:idoerg@gmail.com">idoerg@gmail.com</a>&gt;<br>
To: Tiago Antao &lt;<a href="mailto:tra@popgen.net">tra@popgen.net</a>&gt;<br>
Cc: Biopython Mailing List &lt;<a href="mailto:biopython@biopython.org">biopython@biopython.org</a>&gt;<br>
Subject: Re: [Biopython] Bioinformatics with Python cookbook<br>
Message-ID:<br>
        &lt;CABm4-MQxTm6x_fS-_91R40y=ME0=<a href="mailto:pJQgnCGo15RqvwKfYn-DHA@mail.gmail.com">pJQgnCGo15RqvwKfYn-DHA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Wow, nice going, Tiago. Will buy!<br>
<br>
On Tue, Jul 7, 2015 at 6:26 AM, Tiago Antao &lt;<a href="mailto:tra@popgen.net">tra@popgen.net</a>&gt; wrote:<br>
<br>
&gt; Dear all,<br>
&gt;<br>
&gt;<br>
&gt; I would like to announce &quot;Bioinformatics with Python Cookbook&quot; which I<br>
&gt; authored. As you might imagine Biopython is discussed heavily in the<br>
&gt; book.<br>
&gt;<br>
&gt; This book is slightly different from the standard books on<br>
&gt; Bioinformatics and Python. It is not about teaching Bioinformatics<br>
&gt; algorithms, but about solving practical day-to-day problems with<br>
&gt; Python, for example:<br>
&gt;<br>
&gt; Next-Generation Sequencing: FASTQ, BAM and VCF processing. Along with<br>
&gt; filtering of datasets.<br>
&gt;<br>
&gt; Genomics: processing reference genomes of both high-quality references<br>
&gt; of model species and low-quality non-model species. Also discussed are<br>
&gt; genome annotations and gene ontologies.<br>
&gt;<br>
&gt; Population Genetics: doing PCA, Admixture/Structure, computing FSTs, ...<br>
&gt;<br>
&gt; Genome simulation: mostly forward-time simulations, but also a bit of<br>
&gt; coalescent<br>
&gt;<br>
&gt; Phylogenetics: tree reconstruction and tree drawing<br>
&gt;<br>
&gt; Proteins: PDB processing and visualization.<br>
&gt;<br>
&gt; Other topics like processing map data, GBIF, interfacing with<br>
&gt; Cytoscape, accessing lots of online databases, ...<br>
&gt;<br>
&gt; There is a bit on interacting with R/Bioconductor via Python.<br>
&gt;<br>
&gt; Finally we discuss high-performance in Python: faster algorithms,<br>
&gt; clusters, Numba and Cython. Also related technologies like Docker<br>
&gt;<br>
&gt; The book discusses the usual Python Libraries in the field: Biopython,<br>
&gt; PyVCF, Pysam, simuPOP, DendroPy, Pymol and also scientific libraries<br>
&gt; like NumPy, SciPy, matplotlib and scikit-learn.<br>
&gt;<br>
&gt; The code is fully available for free at github<br>
&gt;<br>
&gt; <a href="https://github.com/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb" rel="noreferrer" target="_blank">https://github.com/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb</a><br>
&gt;<br>
&gt; I am keen on maintaining the book code, so if you find any issues<br>
&gt; please do contact me.<br>
&gt;<br>
&gt; The book is available in the usual places (Amazon, etc.) in paperback<br>
&gt; and e-book format. The web page of the book is<br>
&gt;<br>
&gt; <a href="https://www.packtpub.com/application-development/bioinformatics-python-cookbook" rel="noreferrer" target="_blank">https://www.packtpub.com/application-development/bioinformatics-python-cookbook</a><br>
&gt;<br>
&gt; Regards,<br>
&gt; Tiago<br>
&gt; _______________________________________________<br>
&gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
&gt;<br>
<br>
<br>
<br>
--<br>
Iddo Friedberg<br>
<a href="http://iddo-friedberg.net/contact.html" rel="noreferrer" target="_blank">http://iddo-friedberg.net/contact.html</a><br>
++++++++++[&gt;+++&gt;++++++&gt;++++++++&gt;++++++++++&gt;+++++++++++&lt;&lt;&lt;&lt;&lt;-]&gt;&gt;&gt;&gt;++++.&gt;<br>
++++++..----.&lt;&lt;&lt;&lt;++++++++++++++++++++++++++++.-----------..&gt;&gt;&gt;+.-----.<br>
.&gt;-.&lt;&lt;&lt;&lt;--.&gt;&gt;&gt;++.&gt;+++.&lt;+++.----.-.&lt;++++++++++++++++++.&gt;+.&gt;.&lt;++.&lt;&lt;&lt;+.&gt;&gt;<br>
&gt;&gt;----.&lt;--.&gt;++++++.&lt;&lt;&lt;&lt;------------------------------------.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://mailman.open-bio.org/pipermail/biopython/attachments/20150708/65038d9c/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.open-bio.org/pipermail/biopython/attachments/20150708/65038d9c/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 9 Jul 2015 01:35:44 +0200<br>
From: Wibowo Arindrarto &lt;<a href="mailto:w.arindrarto@gmail.com">w.arindrarto@gmail.com</a>&gt;<br>
To: Iddo Friedberg &lt;<a href="mailto:idoerg@gmail.com">idoerg@gmail.com</a>&gt;<br>
Cc: Biopython Mailing List &lt;<a href="mailto:biopython@biopython.org">biopython@biopython.org</a>&gt;<br>
Subject: Re: [Biopython] Bioinformatics with Python cookbook<br>
Message-ID:<br>
        &lt;<a href="mailto:CADEGkF512cv2G07iwgAETt3m0Oc-c8nHUivaKgNvyONN%2Bn7tjQ@mail.gmail.com">CADEGkF512cv2G07iwgAETt3m0Oc-c8nHUivaKgNvyONN+n7tjQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
Hi Tiago,<br>
<br>
Congratulations on publishing the book! +1 as well for using notebooks<br>
and putting them on GitHub (and using many of the up-and-coming<br>
libraries ~ I see e.g. numba and spark there :) ).<br>
<br>
One small note, apparently the direct links to the other notebooks in<br>
the Welcome.ipynb notebook is not working properly in the<br>
GitHub-rendered page. Looks like this is something from GitHub, though<br>
(i.e. the way they render notebook links in notebooks). Anyway, just<br>
in case you haven&#39;t noticed :).<br>
<br>
Cheers,<br>
<br>
On Wed, Jul 8, 2015 at 8:02 PM, Iddo Friedberg &lt;<a href="mailto:idoerg@gmail.com">idoerg@gmail.com</a>&gt; wrote:<br>
&gt; Wow, nice going, Tiago. Will buy!<br>
&gt;<br>
&gt; On Tue, Jul 7, 2015 at 6:26 AM, Tiago Antao &lt;<a href="mailto:tra@popgen.net">tra@popgen.net</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Dear all,<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I would like to announce &quot;Bioinformatics with Python Cookbook&quot; which I<br>
&gt;&gt; authored. As you might imagine Biopython is discussed heavily in the<br>
&gt;&gt; book.<br>
&gt;&gt;<br>
&gt;&gt; This book is slightly different from the standard books on<br>
&gt;&gt; Bioinformatics and Python. It is not about teaching Bioinformatics<br>
&gt;&gt; algorithms, but about solving practical day-to-day problems with<br>
&gt;&gt; Python, for example:<br>
&gt;&gt;<br>
&gt;&gt; Next-Generation Sequencing: FASTQ, BAM and VCF processing. Along with<br>
&gt;&gt; filtering of datasets.<br>
&gt;&gt;<br>
&gt;&gt; Genomics: processing reference genomes of both high-quality references<br>
&gt;&gt; of model species and low-quality non-model species. Also discussed are<br>
&gt;&gt; genome annotations and gene ontologies.<br>
&gt;&gt;<br>
&gt;&gt; Population Genetics: doing PCA, Admixture/Structure, computing FSTs, ...<br>
&gt;&gt;<br>
&gt;&gt; Genome simulation: mostly forward-time simulations, but also a bit of<br>
&gt;&gt; coalescent<br>
&gt;&gt;<br>
&gt;&gt; Phylogenetics: tree reconstruction and tree drawing<br>
&gt;&gt;<br>
&gt;&gt; Proteins: PDB processing and visualization.<br>
&gt;&gt;<br>
&gt;&gt; Other topics like processing map data, GBIF, interfacing with<br>
&gt;&gt; Cytoscape, accessing lots of online databases, ...<br>
&gt;&gt;<br>
&gt;&gt; There is a bit on interacting with R/Bioconductor via Python.<br>
&gt;&gt;<br>
&gt;&gt; Finally we discuss high-performance in Python: faster algorithms,<br>
&gt;&gt; clusters, Numba and Cython. Also related technologies like Docker<br>
&gt;&gt;<br>
&gt;&gt; The book discusses the usual Python Libraries in the field: Biopython,<br>
&gt;&gt; PyVCF, Pysam, simuPOP, DendroPy, Pymol and also scientific libraries<br>
&gt;&gt; like NumPy, SciPy, matplotlib and scikit-learn.<br>
&gt;&gt;<br>
&gt;&gt; The code is fully available for free at github<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://github.com/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb" rel="noreferrer" target="_blank">https://github.com/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb</a><br>
&gt;&gt;<br>
&gt;&gt; I am keen on maintaining the book code, so if you find any issues<br>
&gt;&gt; please do contact me.<br>
&gt;&gt;<br>
&gt;&gt; The book is available in the usual places (Amazon, etc.) in paperback<br>
&gt;&gt; and e-book format. The web page of the book is<br>
&gt;&gt;<br>
&gt;&gt; <a href="https://www.packtpub.com/application-development/bioinformatics-python-cookbook" rel="noreferrer" target="_blank">https://www.packtpub.com/application-development/bioinformatics-python-cookbook</a><br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Tiago<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt;&gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Iddo Friedberg<br>
&gt; <a href="http://iddo-friedberg.net/contact.html" rel="noreferrer" target="_blank">http://iddo-friedberg.net/contact.html</a><br>
&gt; ++++++++++[&gt;+++&gt;++++++&gt;++++++++&gt;++++++++++&gt;+++++++++++&lt;&lt;&lt;&lt;&lt;-]&gt;&gt;&gt;&gt;++++.&gt;<br>
&gt; ++++++..----.&lt;&lt;&lt;&lt;++++++++++++++++++++++++++++.-----------..&gt;&gt;&gt;+.-----.<br>
&gt; .&gt;-.&lt;&lt;&lt;&lt;--.&gt;&gt;&gt;++.&gt;+++.&lt;+++.----.-.&lt;++++++++++++++++++.&gt;+.&gt;.&lt;++.&lt;&lt;&lt;+.&gt;&gt;<br>
&gt;&gt;&gt;----.&lt;--.&gt;++++++.&lt;&lt;&lt;&lt;------------------------------------.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 8 Jul 2015 21:12:46 -0400<br>
From: &quot;Zach Gayk&quot; &lt;<a href="mailto:zgayk@nmu.edu">zgayk@nmu.edu</a>&gt;<br>
To: <a href="mailto:biopython@mailman.open-bio.org">biopython@mailman.open-bio.org</a><br>
Subject: [Biopython] Entrez EFetch Options<br>
Message-ID:<br>
        &lt;<a href="mailto:1a6578a08666733c24564622fe2f8dc2.squirrel@webmail.nmu.edu">1a6578a08666733c24564622fe2f8dc2.squirrel@webmail.nmu.edu</a>&gt;<br>
Content-Type: text/plain;charset=iso-8859-1<br>
<br>
Hello,<br>
<br>
I would like to use the following code from the biopython tutorial to<br>
retrieve gi numbers for a number of sequences that matched to scaffolds on<br>
a genome assembly:<br>
<br>
import os<br>
os.chdir(&#39;/Users/zachgayk/Desktop/GAVIABioinformatics/&#39;)<br>
from Bio import Entrez # this is the most likely script modified<br>
from Bio import SeqIO<br>
Entrez.email = &quot;<a href="mailto:zgayk@nmu.edu">zgayk@nmu.edu</a>&quot;<br>
handle = Entrez.efetch(db=&quot;nucleotide&quot;, rettype=&quot;gb&quot;, retmode=&quot;text&quot;, \<br>
                       id=&quot;gi|50254217|gb|`, gi|50254217|gb|AY567890.1|,<br>
gi|559028|gb|L33375.1|GVSMTDGI,<br>
gi|559028|gb|L33375.1|GVSMTDGI&quot;)<br>
for seq_record in SeqIO.parse(handle, &quot;gb&quot;):<br>
    print seq_record.description[:100] + &quot;...&quot; # the :100 specifies no.<br>
characters and &quot;...&quot; says this comes after specified character limit<br>
handle.close()<br>
<br>
The problem, however, is that there are a large number of gi numbers I<br>
wish to retrieve, and so there are simply too many to manually enter into<br>
the id =&quot;&quot; field. What I would like to do is specify a file containing all<br>
of the needed gi numbers in a list and then have the code parse all of<br>
them. I haven&#39;t been able to figure out how to do this yet, and if anyone<br>
has any ideas they would be very much appreciated.<br>
<br>
Thank you,<br>
Zach Gayk<br>
<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 8 Jul 2015 21:25:27 -0400<br>
From: Chris Mitchell &lt;<a href="mailto:chris.mit7@gmail.com">chris.mit7@gmail.com</a>&gt;<br>
To: Wibowo Arindrarto &lt;<a href="mailto:w.arindrarto@gmail.com">w.arindrarto@gmail.com</a>&gt;<br>
Cc: Iddo Friedberg &lt;<a href="mailto:idoerg@gmail.com">idoerg@gmail.com</a>&gt;, <a href="mailto:biopython@biopython.org">biopython@biopython.org</a><br>
Subject: Re: [Biopython] Bioinformatics with Python cookbook<br>
Message-ID:<br>
        &lt;<a href="mailto:CAK_U6OCMSuxexTfj3S2zvoY-UkTMERX8sp9vaPpMvwvVU_w0pw@mail.gmail.com">CAK_U6OCMSuxexTfj3S2zvoY-UkTMERX8sp9vaPpMvwvVU_w0pw@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
I noticed that as well bow, but it&#39;s only for pages that are opened in a<br>
new tab.<br>
<br>
Really good stuff all in all.<br>
<br>
Sent from my phone<br>
On Jul 8, 2015 8:07 PM, &quot;Wibowo Arindrarto&quot; &lt;<a href="mailto:w.arindrarto@gmail.com">w.arindrarto@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi Tiago,<br>
&gt;<br>
&gt; Congratulations on publishing the book! +1 as well for using notebooks<br>
&gt; and putting them on GitHub (and using many of the up-and-coming<br>
&gt; libraries ~ I see e.g. numba and spark there :) ).<br>
&gt;<br>
&gt; One small note, apparently the direct links to the other notebooks in<br>
&gt; the Welcome.ipynb notebook is not working properly in the<br>
&gt; GitHub-rendered page. Looks like this is something from GitHub, though<br>
&gt; (i.e. the way they render notebook links in notebooks). Anyway, just<br>
&gt; in case you haven&#39;t noticed :).<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt; On Wed, Jul 8, 2015 at 8:02 PM, Iddo Friedberg &lt;<a href="mailto:idoerg@gmail.com">idoerg@gmail.com</a>&gt; wrote:<br>
&gt; &gt; Wow, nice going, Tiago. Will buy!<br>
&gt; &gt;<br>
&gt; &gt; On Tue, Jul 7, 2015 at 6:26 AM, Tiago Antao &lt;<a href="mailto:tra@popgen.net">tra@popgen.net</a>&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Dear all,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I would like to announce &quot;Bioinformatics with Python Cookbook&quot; which I<br>
&gt; &gt;&gt; authored. As you might imagine Biopython is discussed heavily in the<br>
&gt; &gt;&gt; book.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; This book is slightly different from the standard books on<br>
&gt; &gt;&gt; Bioinformatics and Python. It is not about teaching Bioinformatics<br>
&gt; &gt;&gt; algorithms, but about solving practical day-to-day problems with<br>
&gt; &gt;&gt; Python, for example:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Next-Generation Sequencing: FASTQ, BAM and VCF processing. Along with<br>
&gt; &gt;&gt; filtering of datasets.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Genomics: processing reference genomes of both high-quality references<br>
&gt; &gt;&gt; of model species and low-quality non-model species. Also discussed are<br>
&gt; &gt;&gt; genome annotations and gene ontologies.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Population Genetics: doing PCA, Admixture/Structure, computing FSTs, ...<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Genome simulation: mostly forward-time simulations, but also a bit of<br>
&gt; &gt;&gt; coalescent<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Phylogenetics: tree reconstruction and tree drawing<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Proteins: PDB processing and visualization.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Other topics like processing map data, GBIF, interfacing with<br>
&gt; &gt;&gt; Cytoscape, accessing lots of online databases, ...<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; There is a bit on interacting with R/Bioconductor via Python.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Finally we discuss high-performance in Python: faster algorithms,<br>
&gt; &gt;&gt; clusters, Numba and Cython. Also related technologies like Docker<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The book discusses the usual Python Libraries in the field: Biopython,<br>
&gt; &gt;&gt; PyVCF, Pysam, simuPOP, DendroPy, Pymol and also scientific libraries<br>
&gt; &gt;&gt; like NumPy, SciPy, matplotlib and scikit-learn.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The code is fully available for free at github<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://github.com/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb" rel="noreferrer" target="_blank">https://github.com/tiagoantao/bioinf-python/blob/master/notebooks/Welcome.ipynb</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; I am keen on maintaining the book code, so if you find any issues<br>
&gt; &gt;&gt; please do contact me.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The book is available in the usual places (Amazon, etc.) in paperback<br>
&gt; &gt;&gt; and e-book format. The web page of the book is<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://www.packtpub.com/application-development/bioinformatics-python-cookbook" rel="noreferrer" target="_blank">https://www.packtpub.com/application-development/bioinformatics-python-cookbook</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Regards,<br>
&gt; &gt;&gt; Tiago<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt; &gt;&gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Iddo Friedberg<br>
&gt; &gt; <a href="http://iddo-friedberg.net/contact.html" rel="noreferrer" target="_blank">http://iddo-friedberg.net/contact.html</a><br>
&gt; &gt; ++++++++++[&gt;+++&gt;++++++&gt;++++++++&gt;++++++++++&gt;+++++++++++&lt;&lt;&lt;&lt;&lt;-]&gt;&gt;&gt;&gt;++++.&gt;<br>
&gt; &gt; ++++++..----.&lt;&lt;&lt;&lt;++++++++++++++++++++++++++++.-----------..&gt;&gt;&gt;+.-----.<br>
&gt; &gt; .&gt;-.&lt;&lt;&lt;&lt;--.&gt;&gt;&gt;++.&gt;+++.&lt;+++.----.-.&lt;++++++++++++++++++.&gt;+.&gt;.&lt;++.&lt;&lt;&lt;+.&gt;&gt;<br>
&gt; &gt;&gt;&gt;----.&lt;--.&gt;++++++.&lt;&lt;&lt;&lt;------------------------------------.<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt; &gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
&gt; _______________________________________________<br>
&gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://mailman.open-bio.org/pipermail/biopython/attachments/20150708/08f11293/attachment-0001.html" rel="noreferrer" target="_blank">http://mailman.open-bio.org/pipermail/biopython/attachments/20150708/08f11293/attachment-0001.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 8 Jul 2015 23:29:01 -0400<br>
From: Joshua Klein &lt;<a href="mailto:mobiusklein@gmail.com">mobiusklein@gmail.com</a>&gt;<br>
To: Zach Gayk &lt;<a href="mailto:zgayk@nmu.edu">zgayk@nmu.edu</a>&gt;<br>
Cc: <a href="mailto:biopython@mailman.open-bio.org">biopython@mailman.open-bio.org</a><br>
Subject: Re: [Biopython] Entrez EFetch Options<br>
Message-ID:<br>
        &lt;<a href="mailto:CAFZWoGbwDtfzFe02p3qtAyVEjBdSo-oLTzOaOqRkeTuCqKJqkA@mail.gmail.com">CAFZWoGbwDtfzFe02p3qtAyVEjBdSo-oLTzOaOqRkeTuCqKJqkA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
If you store your list of identifiers in a file given by the variable<br>
&#39;file_path&#39;, with one identifier per line, you can use:<br>
<br>
ids_to_fetch = &quot;,&quot;.join(open(file_path))<br>
<br>
This code will open the file, and use the default iteration behavior for<br>
file objects to yield a line at a time to the join method of the string<br>
&quot;,&quot;. This will create a long string of comma-separated identifiers to use<br>
in your efetch call.<br>
<br>
On Wed, Jul 8, 2015 at 9:12 PM, Zach Gayk &lt;<a href="mailto:zgayk@nmu.edu">zgayk@nmu.edu</a>&gt; wrote:<br>
<br>
&gt; Hello,<br>
&gt;<br>
&gt; I would like to use the following code from the biopython tutorial to<br>
&gt; retrieve gi numbers for a number of sequences that matched to scaffolds on<br>
&gt; a genome assembly:<br>
&gt;<br>
&gt; import os<br>
&gt; os.chdir(&#39;/Users/zachgayk/Desktop/GAVIABioinformatics/&#39;)<br>
&gt; from Bio import Entrez # this is the most likely script modified<br>
&gt; from Bio import SeqIO<br>
&gt; Entrez.email = &quot;<a href="mailto:zgayk@nmu.edu">zgayk@nmu.edu</a>&quot;<br>
&gt; handle = Entrez.efetch(db=&quot;nucleotide&quot;, rettype=&quot;gb&quot;, retmode=&quot;text&quot;, \<br>
&gt;                        id=&quot;gi|50254217|gb|`, gi|50254217|gb|AY567890.1|,<br>
&gt; gi|559028|gb|L33375.1|GVSMTDGI,<br>
&gt; gi|559028|gb|L33375.1|GVSMTDGI&quot;)<br>
&gt; for seq_record in SeqIO.parse(handle, &quot;gb&quot;):<br>
&gt;     print seq_record.description[:100] + &quot;...&quot; # the :100 specifies no.<br>
&gt; characters and &quot;...&quot; says this comes after specified character limit<br>
&gt; handle.close()<br>
&gt;<br>
&gt; The problem, however, is that there are a large number of gi numbers I<br>
&gt; wish to retrieve, and so there are simply too many to manually enter into<br>
&gt; the id =&quot;&quot; field. What I would like to do is specify a file containing all<br>
&gt; of the needed gi numbers in a list and then have the code parse all of<br>
&gt; them. I haven&#39;t been able to figure out how to do this yet, and if anyone<br>
&gt; has any ideas they would be very much appreciated.<br>
&gt;<br>
&gt; Thank you,<br>
&gt; Zach Gayk<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
&gt; <a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://mailman.open-bio.org/pipermail/biopython/attachments/20150708/f83d063f/attachment.html" rel="noreferrer" target="_blank">http://mailman.open-bio.org/pipermail/biopython/attachments/20150708/f83d063f/attachment.html</a>&gt;<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biopython" rel="noreferrer" target="_blank">http://mailman.open-bio.org/mailman/listinfo/biopython</a><br>
<br>
End of Biopython Digest, Vol 151, Issue 4<br>
*****************************************<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="garamond, serif" size="2">______O_________oO________oO______o_______oO__<br>Björn Johansson<br>Assistant Professor<br>Departament of Biology<br>University of Minho<br>Campus de Gualtar<br>4710-057 Braga<br>PORTUGAL<br><a href="http://www.bio.uminho.pt" target="_blank">www.bio.uminho.pt</a><br><a href="https://profiles.google.com/bjornjobb" target="_blank">Google profile</a></font><div><font face="garamond, serif" size="2"><a href="http://scholar.google.com/citations?user=7AiEuJ4AAAAJ" target="_blank">Google Scholar Profile</a><br>my <a href="https://sites.google.com/site/metabolicengineeringgroup/" target="_blank">group</a><br>Office (direct) +351-253 601517 | (PT) mob.  +351-967 147 704 | (SWE) mob.  +46 739 792 968<br>Dept of Biology (secr) +351-253 60 4310  | fax +351-253 678980</font></div></div></div>
</div>