[Biopython-dev] Error in SeqFeature.CompoundLocation parsing NCBI efetch format

Peter Cock p.j.a.cock at googlemail.com
Thu Dec 5 16:43:20 UTC 2013


On Thu, Dec 5, 2013 at 4:29 PM, Brynjar Smári Bjarnason
<binni at binnisb.com> wrote:
>
> Hello.
>
> I see CompoundLocation is quite new. I am currently using anaconda
> (Python 2.7.6 :: Anaconda 1.8.0 (64-bit)) and BioPython 1.62.
>
> I am fetching gi values and using SeqIO to parse them. So far most of
> them work but I found one that fail.
>
> Code:
>
> p = Entrez.efetch(db="protein", rettype="gp", retmode="text",id="494379")
> seq = SeqIO.read(p,"gb")
>
> Gives error:
> ValueError: CompoundLocation should have at least 2 parts
>
> With quite long stack trace and the last one being:
>
> /Bio/SeqFeature.pyc:
>       996         if len(self.parts) < 2:
> --> 997             raise ValueError("CompoundLocation should have at
> least 2 parts")
>
> Any suggestions on how to fix this, and maybe what is different with
> this gi from the rest of them (one gi that works: 10342)?
>
> Brynjar

Hi Brynjar,

Hmm. Right now the website is very slow & won't load
http://www.ncbi.nlm.nih.gov/protein/494379
and via Entrez I am getting a network error:
urllib2.HTTPError: HTTP Error 502: Bad Gateway

Where you able to save the file, and could you post it online
(e.g. at http://gist.github.com)?

Regards,

Peter




More information about the Biopython-dev mailing list