Loading local pdb files to shiny molstar
kapilaGIT opened this issue · comments
I have been trying the following lines inside my server.R , but none works
e.g. 1
server = function(input, output) {
observe({
url2 <- urltag(input$file1) #I call urltag function in the global.R to get string (the file name)
cat(file=stderr(), paste0(url2, "\n"))
})
output$molbox = renderUI({
#molbox is defined in ui.R
Molstar(
.....
url = url2 # this come from the global.R based on the file uploaded under file1
......
)
})
}
e.g. 2
I copied only the Molstar portion of the script here, otherwise everything is the same as above.
Molstar(
.....
url = paste0(url2,"format='pdb'"),
......
)
)
but both produce empty space, where the structure should appear. I don't get any error in the log file of this shiny app and it prints out the loaded file name as I use the following line to check url2 has the correct string.
cat(file=stderr(), paste0(url2, "\n"))
I get the following screens before and after I load the pdb file.
I also gave the path manually in the following manner to check whether the structure will be displayed, but that didn't work either.
Molstar(
.....
url = '/path/to/my.pdb',
......
)
)
Molstar(
.....
url = paste0("'/path/to/my.pdb', format='pdb'")
......
)
)
I have no knowledge of shiny molstar. Best to contact the developer of it.