[Biopython] SLEN analogue in entrez.efetch/entrez.esearch
Anna Kostikova
anna.kostikova at gmail.com
Fri Mar 30 11:28:17 EDT 2012
Thanks a lot Peter for the advice and the link - super useful trick!
a very straightaway solution, indeed:)
handle = Entrez.esearch(db="nucleotide",term=organism +'[ORGN] AND
100:1000[SLEN]')
Thanks a lot again,
Anna
2012/3/30 Peter Cock <p.j.a.cock at googlemail.com>:
> 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