啥也不懂,啥也不问
就放个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.
最后,向大家隆重推荐生信技能树的一系列干货!
- 生信技能树全球公益巡讲:https://mp.weixin.qq.com/s/E9ykuIbc-2Ja9HOY0bn_6g
- B站公益74小时生信工程师教学视频合辑:https://mp.weixin.qq.com/s/IyFK7l_WBAiUgqQi8O7Hxw
- 招学徒:https://mp.weixin.qq.com/s/KgbilzXnFjbKKunuw7NVfw