如何解决在 Shiny 中从上传的 Seurat 对象中提取元数据以进行选择输入选择
我正在尝试创建一个 Shiny 应用程序,它允许我比较来自 Seurat 对象的簇,并输出差异表达基因的列表。到目前为止,我已经尝试过:
#here's the UI portion I need help with:
selectInput(inputId = "clusters",label = "Choose cluster 1: ",choices = NULL)
#here's the server function
server <- function(input,output,session) {
#this is to load in the datasets reactively; i.e,they are not loaded until you select them
datasetInput <- reactive({
if (input$dataset_selec == "NK AD Dataset") {
dataset <- get(load("~/Desktop/Shiny App/Seuratapp/data/nk_integrated_object.Rdata"))
}
else if (input$dataset_selec == "APPPS1 Dataset") {
dataset <- get(load("~/Desktop/ShinyApp/Seuratapp/data/appps1_lymphocytes_object.Rdata"))
}
else if (input$dataset_selec == "T Cell Infiltration Dataset") {
dataset <- get(load("~/Desktop/Shiny App/Seuratapp/data/tcell_infiltration.Rdata"))
}
return(dataset)
})
#this is to transform the loaded dataset into something I can use as labels
dataset <- datasetInput
updateSelectInput(session,inputId = "Metadata_split",label = "Choose category to split by: ",choices = colnames(dataset@Metadata))
这行不通,我敢肯定有多种原因,但坦率地说,我什至无法理解从哪里开始解决这个问题。谁能帮帮我?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。