[Biopython] Fetching fasta sequences by accession number
Patrick Kunzmann
padix.kleber at gmail.com
Fri Apr 20 13:37:33 UTC 2018
Hi Ahmad,
I am not sure, if Biopython is able to do this, but Biotite (a package,
I am currently developing) can handle it.
If you want to multiple files you can use
/biotite.database.entrez.fetch()/
(http://www.biotite-python.org/apidoc/biotite.database.entrez/fetch.html).
If you want all sequences in a single file you can use
/biotite.database.entrez.fetch_single_file()/
(http://www.biotite-python.org/apidoc/biotite.database.entrez/fetch_single_file.html).
Example:
import biotite.database.entrez as entrez
file_name = entrez.fetch_single_file(["M95099"," M95098"], "test.fasta",
db_name="nuccore", ret_type="fasta")
Best regards
Patrick
On 20.04.2018 13:25, Ahmad Abdelzaher wrote:
> How can I batch download fasta sequences by accession number? Is there
> a Biopython method that can do that? Any other suggestions or
> alternatives?
>
> Regards.
>
>
> _______________________________________________
> Biopython mailing list - Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20180420/f9ebe1d3/attachment.html>
More information about the Biopython
mailing list