[Biopython-dev] 5/13 biopython Questions - BioStar

Feed My Inbox updates at feedmyinbox.com
Fri May 13 08:31:03 UTC 2011


// Bio.GenBank.LocationParserError
// May 10, 2011 at 1:50 PM

http://biostar.stackexchange.com/questions/8203/bio-genbank-locationparsererror
Hi all,

I'm scanning through all of GenBank's bacterial genomes using biopython.

I've been getting an occasional error recently parsing location data. Specifically:

  
  File "/usr/lib/pymodules/python2.7/Bio/SeqIO/__init__.py", line 525, in parse
    for r in i:
  File "/usr/lib/pymodules/python2.7/Bio/GenBank/Scanner.py", line 437, in parse_records
    record = self.parse(handle, do_features)
  File "/usr/lib/pymodules/python2.7/Bio/GenBank/Scanner.py", line 420, in parse
    if self.feed(handle, consumer, do_features):
  File "/usr/lib/pymodules/python2.7/Bio/GenBank/Scanner.py", line 392, in feed
    self._feed_feature_table(consumer, self.parse_features(skip=False))
  File "/usr/lib/pymodules/python2.7/Bio/GenBank/Scanner.py", line 344, in _feed_feature_table
    consumer.location(location_string)
  File "/usr/lib/pymodules/python2.7/Bio/GenBank/__init__.py", line 975, in location
    raise LocationParserError(location_line)
  Bio.GenBank.LocationParserError: order(join(649703..649712,649751..649752),650047..650049)


My code is a simple loop through all filenames I feed in at the command line:


        [...]

        try:
            contig = SeqIO.parse(open(gb_file,"r"), "genbank")
        except:
            sys.stderr.write("ERROR: Parsing gbk file "+gb_file+"!\n")
            sys.exit(1)
        sys.stderr.write("Loading genome " + str(counter) + " of "+str(len(sys.argv)-1)+" ("+gb_file+")\n")

        for gb_record in contig:

           [...]



This is in the Aeropyrum pernix K1 genome, NC_000854.gbk. I don't see anything wrong with the location data. Can anyone help?

Thanks,
-Morgan


// making all protein sequence lengths same
// May 4, 2011 at 3:31 AM

http://biostar.stackexchange.com/questions/8033/making-all-protein-sequence-lengths-same
Is there any code in perl / python to make all protein sequences of same length, otherwise my phylogenetic tool MEGA is not working on them ?


--
Website: http://biostar.stackexchange.com/questions/tagged/biopython

Account Login: 
https://www.feedmyinbox.com/members/login/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

Unsubscribe here: 
http://www.feedmyinbox.com/feeds/unsubscribe/687953/851dd4cd10a2537cf271a85dfd1566976527e0cd/?utm_source=fmi&utm_medium=email&utm_campaign=feed-email

--
This email was carefully delivered by FeedMyInbox.com. 
PO Box 682532 Franklin, TN 37068




More information about the Biopython-dev mailing list