基于神包clusterProfiler的ID转换+MSigDb+

作者: 美式永不加糖 | 来源:发表于2019-08-14 22:54 被阅读10次

    啥也不懂,啥也不问


    就放个ui代码吧

    library(shiny)
    library(shinythemes)
    library(DT)
    
    
    ui <- fluidPage(theme = shinytheme("paper"),
                    titlePanel("GSEA-KEGG"),
                    hr(),
                    h3("Get GSEA Info Table"),
                    sidebarLayout(
                      
                      sidebarPanel(
                        fileInput("file1","Upload a RANKED GENE LIST (decreasing order) file",
                                  multiple = FALSE,
                                  accept = c('text/csv',
                                             'text/comma-separated-values',
                                             'text/tab-separated-values',
                                             'text/plain',
                                             '.csv')),
                        helpText("Note1. Your genelist should contain gene ID with corresponding numeric variable (e.g., FC)."),
                        helpText("Note2. The preferred format of gene ID is ENTREZID."),
                        radioButtons("categorycd", "Select a Category Code from ", 
                                     c("H"="hallmark","C1"="c1","C2"="c2","C3"="c3",
                                       "C4"="c4","C5"="c5","C6"="c6","C7"="c7"),
                                     selected = 'hallmark'),
                        br(),
                        textInput("annodb","Type your Annotation Package","org.Hs.eg.db"),
                        br(),
                        actionButton("action", "RUN"),
                        br(),br(),
                        actionButton("reset", "Rest the Category")
                      ),
                      
                      mainPanel(
                        tabsetPanel(type = "tabs", 
                                    tabPanel("Your Genes", DT::dataTableOutput("genetable")),
                                    tabPanel("MSigDb Table", DT::dataTableOutput("msigtable")),
                                    tabPanel("KEGG pathways", DT::dataTableOutput("keggoutput")))
                        )
                      
                    ),
                      
                    hr(),
                    h3("Pathview Download"),
                    flowLayout(textInput("selectedpath","Type one KEGG ID","hsa00270"),
                    br(),br(),
                    actionButton("downloadimage", "Pathview Image",
                                 icon("project-diagram")),
                    hr()
                      
                    )
    )
    

    DOSE的内置数据写出为.txt后重新读入

    data(geneList, package="DOSE")
    write.table(geneList,file = "DOSE_geneList.txt", quote = F, col.names = F, sep = "\t")
    



    点一下



    get!

    但发现一个问题:

    pathview(gene.data  = genelist(),
                 pathway.id = input$selectedpath,
                 species    = "hsa",
                 limit      = list(gene=max(abs(genelist())), cpd=1),
                 kegg.dir   = "../www")
    

    设置图片储存路径后,*.pathview.png还是在工作路径中


    迷惑desu.

    最后,向大家隆重推荐生信技能树的一系列干货!

    1. 生信技能树全球公益巡讲:https://mp.weixin.qq.com/s/E9ykuIbc-2Ja9HOY0bn_6g
    2. B站公益74小时生信工程师教学视频合辑:https://mp.weixin.qq.com/s/IyFK7l_WBAiUgqQi8O7Hxw
    3. 招学徒:https://mp.weixin.qq.com/s/KgbilzXnFjbKKunuw7NVfw

    相关文章

      网友评论

        本文标题:基于神包clusterProfiler的ID转换+MSigDb+

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