[Biopython] Download a range from genbank

Björn Johansson bjorn_johansson at bio.uminho.pt
Tue Jul 23 13:11:07 UTC 2013


thanks! I tried this:

print Entrez.efetch(db ="nucleotide",id = item,rettype = "gb",retmode =
"text", seq_start = 20, seq_stop = 30).read()

and it gives 10 bp of the pUC19 plasmid.

/bjorn



On Tue, Jul 23, 2013 at 1:49 PM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> On Tue, Jul 23, 2013 at 10:34 AM, Björn Johansson
> <bjorn_johansson at bio.uminho.pt> wrote:
> > Hi,
> > some genbank records are very large and I am usually only interested in a
> > small part.
> >
> > is it possible to only download a part of a genbank record using
> > Bio.Entrez?
> >
> > cheers,
> > bjorn
>
> Yes, for a sequence database you can use optional arguments to
> the efetch command, see:
> http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch
>
> Quote:
>
> seq_start - First sequence base to retrieve. The value should be the
> integer coordinate of the first desired base, with "1" representing
> the first base of the seqence.
>
> seq_stop - Last sequence base to retrieve. The value should be the
> integer coordinate of the last desired base, with "1" representing the
> first base of the seqence.
>
> Peter
>



-- 
______O_________oO________oO______o_______oO__
Björn Johansson
Assistant Professor
Departament of Biology
University of Minho
Campus de Gualtar
4710-057 Braga
PORTUGAL
www.bio.uminho.pt
Google profile <https://profiles.google.com/bjornjobb>
Google Scholar Profile<http://scholar.google.com/citations?user=7AiEuJ4AAAAJ>
my group <https://sites.google.com/site/metabolicengineeringgroup/>
Office (direct) +351-253 601517 | (PT) mob.  +351-967 147 704 | (SWE) mob.
 +46 739 792 968
Dept of Biology (secr) +351-253 60 4310  | fax +351-253 678980




More information about the Biopython mailing list