1、下載GOA文件,下載網(wǎng)址如下:
http://current.geneontology.org/annotations/index.html
2、下載人的文件,如圖:

image.png
3、然后利用腳本選擇你需要的列,腳本如下:
def main():
"""
main function
"""
f = open('goa_human.gaf', 'r')
result = open('goa_human_result.txt', 'w')
f_lines = f.readlines()
for i in f_lines:
i = i.strip()
if 'ensembl:ENSMUSP' in i:
i_list = i.split('\t')
i_list_ensmbl = i_list[4:9]
str_ensmbl = '\t'.join(i_list_ensmbl)
result.write(str_ensmbl + '\n')
f.close()
result.close()
if __name__ == '__main__':
main()
4、生成背景文件Human_GO_background.txt。將需要進(jìn)行GO富集分析的基因整理成列表,下載go-basic.obo文件,直接點(diǎn)擊保存即可,如圖:

image.png
5、輸入的背景數(shù)據(jù)格式Human_GO_background.txt,如圖:

image.png
6、輸入的基因數(shù)據(jù)格式ITGB1_GO.txt,如圖:

image.png