<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Ahmad,</p>
<p>I am not sure, if Biopython is able to do this, but Biotite (a
package, I am currently developing) can handle it.</p>
<p>If you want to multiple files you can use <i>biotite.database.entrez.fetch()</i>
(<a class="moz-txt-link-freetext" href="http://www.biotite-python.org/apidoc/biotite.database.entrez/fetch.html">http://www.biotite-python.org/apidoc/biotite.database.entrez/fetch.html</a>).</p>
<p>If you want all sequences in a single file you can use <i>biotite.database.entrez.fetch_single_file()</i>
(<a class="moz-txt-link-freetext" href="http://www.biotite-python.org/apidoc/biotite.database.entrez/fetch_single_file.html">http://www.biotite-python.org/apidoc/biotite.database.entrez/fetch_single_file.html</a>).</p>
<p><br>
</p>
<p>Example:<br>
</p>
<p>import biotite.database.entrez as entrez</p>
<p>file_name = entrez.fetch_single_file(["M95099"," M95098"],
"test.fasta", db_name="nuccore", ret_type="fasta")</p>
<p><br>
</p>
<p>Best regards</p>
<p>Patrick<br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 20.04.2018 13:25, Ahmad Abdelzaher
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAL1o8vMgu7G0YaCgf3HkaSuS84nHfLaZWWd8pgvuorjOVoxVvQ@mail.gmail.com">
<div dir="ltr">How can I batch download fasta sequences by
accession number? Is there a Biopython method that can do that?
Any other suggestions or alternatives?
<div><br>
</div>
<div>Regards. </div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Biopython mailing list - <a class="moz-txt-link-abbreviated" href="mailto:Biopython@mailman.open-bio.org">Biopython@mailman.open-bio.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.open-bio.org/mailman/listinfo/biopython">http://mailman.open-bio.org/mailman/listinfo/biopython</a></pre>
</blockquote>
<br>
</body>
</html>