BCBio的GFF解析器问题

时间:2011-04-21 09:50:46

标签: python biopython

我正在尝试使用BCBio GFF解析器解析GFF文件,我收到以下错误。有人可以帮我解决这个问题吗?

追踪(最近一次呼叫最后一次):

 File "gff_parse.py", line 6, in <module>
    for rec in GFF.parse(in_handle):
  File "build/bdist.linux-x86_64/egg/BCBio/GFF/GFFParser.py", line 709, in parse
  File "build/bdist.linux-x86_64/egg/BCBio/GFF/GFFParser.py", line 299, in parse_in_parts
  File "build/bdist.linux-x86_64/egg/BCBio/GFF/GFFParser.py", line 320, in parse_simple
  File "build/bdist.linux-x86_64/egg/BCBio/GFF/GFFParser.py", line 603, in _gff_process
  File "build/bdist.linux-x86_64/egg/BCBio/GFF/GFFParser.py", line 634, in _lines_to_out_info
  File "build/bdist.linux-x86_64/egg/BCBio/GFF/GFFParser.py", line 183, in _gff_line_map
ValueError: invalid literal for int() with base 10: 'New Start'

这是我的代码:

from BCBio import GFF    
in_file = "infile.gff"    
in_handle = open(in_file)
for rec in GFF.parse(in_handle):
    print rec
in_handle.close()

由于 Tulika

1 个答案:

答案 0 :(得分:2)

你是如何生成GFF文件的?它似乎包含至少一个无效行。第四列应包含要素的起始坐标的整数;错误消息表明它包含值'New Start'。

GFF3 specification page有一些有效GFF的例子,online validator可以帮助调试这样的格式问题。