Bio.UniProt.GOA模块
UniProt-GOA的GAF、GMA和GPI格式的解析器。
Uniprot-GOA READTE + GAF格式描述:ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/UNIPROT/README
基因协会文件,GAF格式:http://geneontology.org/docs/go-annotation-file-gaf-format-2.2/ http://geneontology.org/docs/go-annotation-file-gaf-format-2.1/ http://geneontology.org/docs/go-annotation-file-gaf-format-2.0/
基因产品协会数据(CPA格式)REAUTE:http://geneontology.org/docs/gene-product-association-data-gpad-format/
基因产品信息(GPI格式)REAUTE:http://geneontology.org/docs/gene-product-information-gpi-format/
Go注释文件位于此处:ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/
- Bio.UniProt.GOA.gpi_iterator(handle)
读取GPI格式文件。
应调用此函数来读取GP_info.goa_uniprot文件。目前,只有一种格式,但这种格式可能会改变,因此该函数是未来包装的占位符。
- Bio.UniProt.GOA.gpa_iterator(handle)
读取GMA格式文件。
应调用此函数来读取gene_association.goa_uniprot文件。读取第一条记录并根据需要返回gpa 1.1或gpa 1.0迭代器
- Bio.UniProt.GOA.gafbyproteiniterator(handle)
迭代基因关联文件中的记录。
返回具有相同DB_Body_ID的所有连续记录的列表应调用此函数来读取gene_association.goa_uniprot文件。读取第一条记录并根据需要返回gaf 2.0或gaf 1.0迭代器2016-04-09:添加了GAF 2.1迭代器并修复了迭代器分配中的错误同时GAF 2.1使用GAF 2.0迭代器
- Bio.UniProt.GOA.gafiterator(handle)
迭代GAF 1.0或2.x文件。
应调用此函数来读取gene_association.goa_uniprot文件。读取第一条记录并根据需要返回gaf 2.x或gaf 1.0迭代器
示例:打开、读取、交互和过滤结果。
原始数据文件已修剪到约600行。
原文来源ftp://ftp.ebi.ac.uk/pub/databases/GO/goa/YEAST/goa_yeast.gaf.gz
>>> from Bio.UniProt.GOA import gafiterator, record_has >>> Evidence = {'Evidence': set(['ND'])} >>> Synonym = {'Synonym': set(['YA19A_YEAST', 'YAL019W-A'])} >>> Taxon_ID = {'Taxon_ID': set(['taxon:559292'])} >>> with open('UniProt/goa_yeast.gaf', 'r') as handle: ... for rec in gafiterator(handle): ... if record_has(rec, Taxon_ID) and record_has(rec, Evidence) and record_has(rec, Synonym): ... for key in ('DB_Object_Name', 'Evidence', 'Synonym', 'Taxon_ID'): ... print(rec[key]) ... Putative uncharacterized protein YAL019W-A ND ['YA19A_YEAST', 'YAL019W-A'] ['taxon:559292'] Putative uncharacterized protein YAL019W-A ND ['YA19A_YEAST', 'YAL019W-A'] ['taxon:559292'] Putative uncharacterized protein YAL019W-A ND ['YA19A_YEAST', 'YAL019W-A'] ['taxon:559292']
- Bio.UniProt.GOA.writerec(outrec, handle, fields=GAF20FIELDS)
将单个UniProt-GOA记录写入输出流。
来电者应该知道格式版本。默认:gaf-2.0如果header有值,则假设这是第一条记录,则写入header。
- Bio.UniProt.GOA.writebyproteinrec(outprotrec, handle, fields=GAF20FIELDS)
将GAF记录列表写入输出流。
来电者应该知道格式版本。默认:gaf-2.0如果header有值,则假设这是第一条记录,则写入header。通常,该列表是由fafbyProtinrec读取的列表,其中包含具有相同DB_Body_ID的所有连续行
- Bio.UniProt.GOA.record_has(inrec, fieldvals)
接受记录和字段值字典。
The format is {'field_name': set([val1, val2])}. If any field in the record has a matching value, the function returns True. Otherwise, returns False.