首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用Bio.Geo读取某些GEO文件?

如何使用Bio.Geo读取某些GEO文件?
EN

Stack Overflow用户
提问于 2013-11-13 18:29:37
回答 1查看 349关注 0票数 3

根据本教程,我试图使用Bio.Geo解析一个GEO文件,方法如下:

代码语言:javascript
复制
from Bio import Geo
handle = open('GSE40603_combined_L1_L2.txt')
records = Geo.parse(handle)
for record in records:
    print record

但是我发现了一个错误:

代码语言:javascript
复制
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 585, in runfile
    execfile(filename, namespace)
  File "/home/ilya/Документы/biology/E coli GCC/GEOanalyzer.py", line 11, in <module>
    for record in records:
  File "/usr/local/lib/python2.7/dist-packages/Bio/Geo/__init__.py", line 60, in parse
    record.table_rows.append(row)
AttributeError: 'NoneType' object has no attribute 'table_rows'

以下是该文件的头:

代码语言:javascript
复制
0   0   63  NC_000913   0   152 NC_000913   0   152 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL  
0   1   81  NC_000913   0   152 NC_000913   153 599 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= thrL  |CDS(+,190,255) gene= thrL  |gene gene= thrA  |CDS(+,337,2799) gene= thrA  note= bifunctional: aspartokinase I (N-terminal); 
0   2   1   NC_000913   0   152 NC_000913   600 698 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= thrA  |CDS[fcd=-312](+,337,2799) gene= thrA  note= bifunctional: aspartokinase I (N-terminal); 
0   3   1   NC_000913   0   152 NC_000913   699 755 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= thrA  |CDS[fcd=-390](+,337,2799) gene= thrA  note= bifunctional: aspartokinase I (N-terminal); 
0   4   1   NC_000913   0   152 NC_000913   756 757 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= thrA  |CDS[fcd=-419](+,337,2799) gene= thrA  note= bifunctional: aspartokinase I (N-terminal); 
0   2620    1   NC_000913   0   152 NC_000913   352429  352483  |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= prpE  |CDS[fcd=-526](+,351930,353816) gene= prpE  note= putative propionyl-CoA synthetase  
0   18818   1   NC_000913   0   152 NC_000913   2560323 2560384 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |misc_feature note= cryptic prophage Eut/CPZ-55  |gene gene= yffO  |CDS[fcd=-220](+,2560133,2560549) gene= yffO  
0   2617    1   NC_000913   0   152 NC_000913   352326  352375  |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= prpE  |CDS[fcd=-420](+,351930,353816) gene= prpE  note= putative propionyl-CoA synthetase  
0   18817   1   NC_000913   0   152 NC_000913   2560275 2560322 |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |misc_feature note= cryptic prophage Eut/CPZ-55  |gene gene= yffO  |CDS[fcd=-165](+,2560133,2560549) gene= yffO  
0   912 1   NC_000913   0   152 NC_000913   113055  113082  |neigh_up NC_000913-start |neigh_down CDS[fcd=114](+,190,255) gene= thrL    |gene gene= coaE  |CDS[fcd=151](-,112599,113219) gene= coaE  note= putative DNA repair protein 

我做错了什么吗?我怎么读这些文件?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-11-14 20:51:46

这个文件是来自GEO的所谓的“补充文件”。它是由原始提交者提供的,因此读取GEO格式的工具将无法与它一起工作。

在这种情况下,最好的方法是使用标准python工具解析下载的文件。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19961582

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档