Visualization of protein structure in R (Shiny)
2
2
Entering edit mode
4.2 years ago
aquaq ▴ 40

Hi All!

I am creating a Shiny server and would like to show the user protein structures from PDB file. I tried to search for a package that is able to do that, but could not find one. bio3d can write the output to open by pymol and Rpdb have a visualization, but unfortunately it is not very good....

Is there any package or workaround that I am not aware of? Or any workaround if cannot be done by a package?

Thank you!

R rshiny pdb protein structure visualization • 4.8k views
ADD COMMENT
1
Entering edit mode

Don't know much about Shiny, but as its web based, can you make use of JSmol/Jmol or something?

ADD REPLY
0
Entering edit mode

Thanks, I will look into it!

ADD REPLY
0
Entering edit mode

PV is great for this, but it's JS not R

ADD REPLY
0
Entering edit mode

Actually if you make use of ShinyJS you can integrate any JavaScript library quite easily in your shiny application. I don't know how the 3D animation will integrate with shiny objects though, but it is worth a try

ADD REPLY
0
Entering edit mode

Thank you both, I hoped to avoid messing around with JS, but these seem good.

ADD REPLY
0
Entering edit mode

Are you hoping to display a dynamic structure or just a static one? If it's the latter, you could perhaps simply fetch an image of the protein from PDB and display that directly?

ADD REPLY
0
Entering edit mode

Thank you for the answer. I have custom PDB files, I cannot just fetch unfortunately

ADD REPLY
6
Entering edit mode
3.8 years ago

I recently released the NGLVieweR package which is a htmlwidget for the NGL.js JavaScript library. It can be used to visualize and interact with protein data bank files (PDB) in R and Shiny applications. It includes a set of API functions to manipulate the viewer after creation and makes it possible to retrieve data from the visualization into R. You can find the documentation here.

Click here to view a Shiny application integrating most features of NGLVieweR

ADD COMMENT
0
Entering edit mode

Hello :)

I tried use NGLVieweR into a shiny app but i failed.

I've a doubt: in my shiny script, user must enter with pdb file as input. How i can read and view protein structure with NGLVieweR? I only managed to use it by reading a local file or putting a pdb code. Please, help me :)

xoxo

ADD REPLY
0
Entering edit mode

Can you post your issue and the code you tried on the NGLVieweR github page? Then I will have a look at it. Maybe also have a look at the below article that explains how file uploads work in Shiny:

https://shiny.rstudio.com/reference/shiny/latest/fileInput.html

ADD REPLY
4
Entering edit mode
3.8 years ago

Hello there! If you are still looking for an implementation for this, myself and another are developing the package {r3dmol} which has support for exactly this. Checkout the documentation here and let us know any feedback if you have particular questions or requests for features :)

ADD COMMENT

Login before adding your answer.

Traffic: 1797 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6