## ----style, echo=FALSE, results='asis', message=FALSE-------------------- BiocStyle::markdown() ## ----评估= false ---------------------------------------------------------------------------------------------------------------------------------------------------------#install.packages(“ Biocmanager”)#Biocmanager :: install(“ AnnotationHub”)## --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------库('AnnotationHub')#创建AnnotationHub连接AH <-AnnotationHub()#搜索所有eupathdb资源meta <-query(ah,“ eupathdb”)长度(meta)head(meta)#EUPATHDB数据可用表(META $ rdataclass)#通过特定数据库表(Meta $ dataProvider)进行资源分配#资源可用长度(唯一(元(Meta $ thert))头的生物列表#------------------------------------------------------------------------------------------------------------ res < - 查询(ah,c('Leishmania Major Friedlin','orgdb','eupathdb'))Res###---------------------------------------------------------------------------------------------------------- orgdb <-Res [['ah65089']]类(orgdb)## ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------#列出可用的字段以检索列(orgdb)#创建一个包含有机体GID的所有基因ID的向量<-keys(orgdb,keytype ='gid')head(gids)#检索每个基因dat <-section的染色体,描述和生物型(orgdb,keys = gids,keytype ='gid ='gid',columns = c('chr','type','geneDescription'))head(dat)表(dat $ type)表(dat $ chr)#创建基因 / go术语gene_go_mapping gene_go_mapping <-选择(orgdb,keys = gids,keytype =''gid',列= c('go_id','go_term_name','notology'))head(gene_go_mapping)#reterieve kegg等。路径注释gene_pathway_mapping_mapping <-选择(orgdb,keys,keys = gids = gids = gids,keytype ='gid ='gid',列,列,列,列= c('pathway','pathway_source'))表(gene_pathway_mapping $ pathway_source)head(gene_pathway_mapping)## -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # query AnnotationHub res< - 查询(ah,c('Leishmania Major Friedlin','Granges','eupathdb')))))) res # retrieve a GRanges instance associated with the result record gr <- res[['AH65354']] gr ## ------------------------------------------------------------------------ # chromosome names seqnames(gr) # strand information strand(gr) # feature widths width(gr) ## ------------------------------------------------------------------------ # list of location types in the resource table(gr$type) ## ------------------------------------------------------------------------ # get the first three ranges gr[1:3] # get all gene entries on chromosome 4 gr[gr$type == 'gene' & seqnames(gr) == 'LmjF.04'] ## ------------------------------------------------------------------------ sessionInfo()