MGI爬虫

作者: 一只烟酒僧 | 来源:发表于2021-03-11 09:34 被阅读0次
    ######################################################## 
    #-------------------------------------------------------
    # Topic:对MGI数据库进行挖掘
    # Author:Wang Haiquan
    # Date:Wed Mar 10 16:52:38 2021
    # Mail:mg1835020@smail.nju.edu.cn
    #-------------------------------------------------------
    ########################################################
    
    library(webdriver)
    library(rvest)
    library(org.Mm.eg.db)
    library(stringr)
    library(Hmisc)
    gene="sycp3"
    MGI_id<-mapIds(org.Mm.eg.db,capitalize(tolower(gene)),"MGI","SYMBOL")
    MGI_ID<-str_replace(MGI_id,"^MGI:","")
    MGI_url<-paste0('http://www.informatics.jax.org/diseasePortal/popup?isPhenotype=true&header=reproductive%20system&markerID=',MGI_ID)
    MGI_url
    MGI_session<-run_phantomjs()
    MGI_session<-Session$new(port = MGI_session$port)
    MGI_session$go(url = MGI_url)
    MGI_session$takeScreenshot(file = paste0(gene,"_reproductive_system_",str_replace(MGI_ID,":","_"),".png"))
    
    
    
    image.png

    相关文章

      网友评论

          本文标题:MGI爬虫

          本文链接:https://www.haomeiwen.com/subject/xgjnqltx.html