[Biopython] SLEN analogue in entrez.efetch/entrez.esearch

Peter Cock p.j.a.cock at googlemail.com
Fri Mar 30 15:10:45 UTC 2012


On Fri, Mar 30, 2012 at 3:49 PM, Anna Kostikova
<anna.kostikova at gmail.com> wrote:
> Dear list members,
>
> Is there a parameter in entrez.efetch/entrez.esearch which would allow
> to only look for and download records with the maximum sequence length
> of <some value>? e.g. an analogue to SLEN parameter of the web
> interface of the NCBI website.
>
> Thanks a lot in advance,
> Anna

For esearch, have you checked the available search fields using
einfo - shown in the Biopython Tutorial and also here:
http://news.open-bio.org/news/2009/06/ncbi-einfo-biopython/

Both the nucleotide and protein databases do include SLEN as a
search field for sequence length. Have you tried including something
like 123[SLEN] in your Entrez search term?

For efetch with a sequence database you can use seq_start and seq_stop
to retrieve just part of the sequence. But that would just crop it:
http://eutils.ncbi.nlm.nih.gov/corehtml/query/static/efetchseq_help.html

Peter



More information about the Biopython mailing list