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

Brynjar Smári Bjarnason binni at binnisb.com
Thu Dec 5 16:29:02 UTC 2013


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.


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:

       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)?


More information about the Biopython-dev mailing list