我们在使用annotationhub对RNAseq差异表达基因进行注释的时候,往往遇到了如下的问题:
> query(ah, "Oryza sativa") ##查找目标物种
AnnotationHub with 4 records
# snapshotDate(): 2019-10-29
# $dataprovider: ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/, Inparanoid8
# $species: Oryza sativa_subsp._japonica, Oryza sativa_Japonica_Group, Oryza sativa_(japonica_cu...
# $rdataclass: OrgDb, Inparanoid8Db
# additional mcols(): taxonomyid, genome, description, coordinate_1_based, maintainer,
# rdatadateadded, preparerclass, tags, rdatapath, sourceurl, sourcetype
# retrieve records with, e.g., 'object[["AH10561"]]'
title
AH10561 | hom.Oryza_sativa.inp8.sqlite
AH75915 | org.Oryza_sativa_(japonica_cultivar-group).eg.sqlite
AH75916 | org.Oryza_sativa_Japonica_Group.eg.sqlite
AH75917 | org.Oryza_sativa_subsp._japonica.eg.sqlite
获取数据库名字这一步没有问题,但是下载就没那么容易了。
常见的两种错误如下:
> tar_org <- ah[["AH10561"]] ##下载目标物种到org数据
downloading 1 resources
retrieving 1 resource
| | 0%
> tar_org <- ah[["AH75917"]] ##下载目标物种到org数据
loading from cache
错误: failed to load resource
name: AH75917
title: org.Oryza_sativa_subsp._japonica.eg.sqlite
reason: database disk image is malformed
此外: Warning messages:
1: Couldn't set cache size: database disk image is malformed
Use `cache_size` = NULL to turn off this warning.
2: Couldn't set synchronous mode: database disk image is malformed
Use `synchronous` = NULL to turn off this warning.
下载注释数据库有问题,我尝试了很多次,最终拟出了一个解决办法
我们以水稻注释数据库为例,
①首先从annotationhub网站上下载注释sqlite文件:http://s3.amazonaws.com/annotationhub/ncbi/uniprot/3.10/org.Oryza_sativa_subsp._japonica.eg.sqlite
②下载好的org.Oryza_sativa_subsp._japonica.eg.sqlite放在C:/Users/Administrator/AppData/Local/AnnotationHub/AnnotationHub/Cache/目录下
③开始手动导入
library(AnnotationDbi) # 提取前20个key并根据它们把信息提取到ZHUSHI这个变量中,输出到zhushi.csv中。 keys=keys(riceorg)[1:20] |
大家想要进行kegg和GO注释的话,调用riceorg就好啦~