BCBio 的 GFF 解析器出现问题

发布于 2024-11-02 09:21:57 字数 991 浏览 5 评论 0原文

我正在尝试使用 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()

谢谢 图利卡

I am trying to parse a GFF file using the BCBio GFF parser and I get the following error. Can anybody help me in resolving this problem?

Traceback (most recent call last):

 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'

Here is my code:

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

Thanks
Tulika

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拧巴小姐 2024-11-09 09:21:57

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

GFF3 规范页面 提供了一些有效 GFF 的示例,并且 在线验证器可以帮助调试此类格式问题。

How did you generate the GFF file? It appears to contain at least one invalid line. The fourth column should contain integers for the start coordinate of a feature; the error message indicates it contains the value 'New Start' instead.

The GFF3 specification page has some examples of valid GFF, and the online validator can help with debugging formatting issues like this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文