r - 在 Shiny 中从上传的 Seurat 对象中提取元数据以进行 selectInput 选择
问题描述
我正在尝试创建一个闪亮的应用程序,它允许我比较来自 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))
这不起作用,我敢肯定有很多原因,但坦率地说,我什至无法理解从哪里开始解决这个问题。谁能帮我吗?
解决方案
推荐阅读
- apache-camel - 使用 Apache Camel SQL 存储过程组件访问 OUT 参数
- c - 编译 C 代码时出现异常错误
- html - Angular 7,引导折叠和 aria-controls 的动态值
- notifications - Microsoft Graph 已删除用户的“更新”通知类型
- react-native - React Native - 使绝对定位的元素在文本输入上可触摸
- apache-kafka - Hbase 变更数据捕获
- html - 当我点击 ul li 菜单时,转换不起作用
- outlook - 在 Outlook 主窗口旁加载 Outlook 360 加载项
- java - java - 如何在Java Spring中创建需要请求标头的API的超链接?
- android - 编译apk时的问题