参考:https://www.cnblogs.com/xiaojikuaipao/p/7190779.html   https://blog.csdn.net/ygyxl/article/details/79742751

GO 注释主要有两种方法:序列相似性比对(BLAST)和结构域相似性比对(InterProScan)

1. 将基因序列与 swiss-prot 蛋白质数据库进行 BLAST 比对,得到如下结果:

       c00_g1_i1       RNF13_MOUSE     52.00   50      23      1       17      166     240     288     2e-11   65.5

       c01_g1_i1       RS25_NEUCR      78.72   94      20      0       375     94      1       94      1e-32   116

     其中,第二列为 swiss-prot 蛋白质数据库序列的 ID(UniProtKB ID)。

2. 注释

   从 ftp://ftp.pir.georgetown.edu/databases/idmapping 下载 idmapping.tb.gz,该文件共有 22 列(tab 键分割),如:

   Q6GZX4    001R_FRG3G  2947773  YP_031579.1  81941549; 49237298  PF04947  GO:0006355; GO:0046782; GO:0006351  UniRef100_Q6GZX4  UniRef90_Q6GZX4 UniRef50_Q6GZX4 UPI00003B0FD4   654924   15165820    AY548484    AAT09660.1

   UniProtKB accession UniProtKB ID EntrezGene RefSeq NCBI GI number PDB Pfam GO PIRSF IPI UniRef100 UniRef90 UniRef50 UniParc PIR-PSD accession NCBI taxonomy MIM UniGene Ensembl PubMed ID EMBL/GenBank/DDBJ EMBL protein_id

  根据文件 idmapping.tb.gz,将 blast 的结果,通过 UniProtKB ID,将第八列的 GO 号注释到对应的基因上,

   python UniProt2GO_annotate.py idmapping.tb.gz blastout outputfile

   结果如下:

c93619_g2_i1 GO:0005506,GO:0016705,GO:0016021,GO:0004497,GO:0020037

c93619_g2_i3 GO:0009733,GO:0020037,GO:0044550,GO:0016021,GO:0016020,GO:0016711,GO:0009813,GO:0005789,GO:0005506

c70056_g1_i1 GO:0005737,GO:0019722,GO:0071889,GO:0005829,GO:0001077,GO:0006357,GO:0097720,GO:0000978,GO:0046872,GO:0005634,GO:0006874

c93748_g1_i1 GO:0006729,GO:0008124