galaxyproject / galaxy Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NGL Viewer for molecule representation #3601
Conversation
|
Thanks @anuprulez! |
| initialize: function( options ) { | ||
| var dataset = options.dataset, | ||
| settings = options.chart.settings, | ||
| url = window.location.protocol + '//' + window.location.host + "/datasets/" + dataset.dataset_id + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be url = dataset.download_url. Then it will also work if the instance url is prefixed.
|
I repacked the scripts with |
|
Looks good to me. |
| color: settings.get( 'colorscheme' ), | ||
| opacity: settings.get( 'opacity' ) | ||
| }; | ||
| stage_parameters = { ext: dataset.extension, name: dataset.name, defaultRepresentation: true }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is dataset.name escaped at this point? Is there any risk here of unsanitized names being displayed in the viz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name option does not seem to be used anywhere nor its documented as option for loadFile. Thanks for pointing it out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, good to know. Since it's unused (and not required), let's cut that out, and then I'm +1 and will merge?
|
Thanks for the contribution, this looks great! |
Introduction:
This Pull Request includes the NGL viewer for visualizing molecular structures like PDB. It uses WebGL to exhibit 2D/3D molecular structures and offers an array of intriguing representations. It is available as charts in the Galaxy.
Here are some representations of PDB molecules using NGL viewer:
Display modes:
There are multiple display modes like representation with axes (Axes), secondary structure abstraction (Cartoon), bonds and atoms shown as cylinders and spheres respectively (Ball+Stick), lines for bonds (Line) and many more. More information can be read here.
Other features:
There is a list of rich color schemes like Uniform, Random, Polymer, Hydrophobicity and so on to display a representation in multiple shades.
The background color of the viewer can be chosen as either light or dark. The radius of a representation can be chosen using a slider. Moreover, any representation can be rotated on an axis by turning on the spin feature.
WebGL support:
To run the NGL viewer, it requires a browser to support WebGL (which is accessible in current browser versions. More information about WebGL support in browsers can be found out here).
Courtesy:
The source code of this library is at here.
AS Rose, AR Bradley, Y Valasatava, JM Duarte, A Prlić and PW Rose. Web-based molecular graphics for large complexes. ACM Proceedings of the 21st International Conference on Web3D Technology (Web3D '16): 185-186, 2016. doi: link
AS Rose and PW Hildebrand. NGL Viewer: a web application for molecular visualization. Nucl Acids Res (1 July 2015) 43 (W1): W576-W579 first published online April 29, 2015. doi: link
Credits:
Thanks a lot to @bgruening and @guerler for their suggestions and reviews.
Note:
The "Surface" display mode takes a few seconds to generate. It is under development as per the official documentation.
The visualizations in Galaxy can be enabled by adding a path in
galaxy.inifilevisualization_plugins_directory = config/plugins/visualizationsThe text was updated successfully, but these errors were encountered: