Giter Site home page Giter Site logo

bluegenes-protein-visualizer's Introduction

BlueGenes Protein Visualizer

BlueGenes Protein Visualizer is a tool made for BlueGenes following BlueGenes Tool API. It can help users (biologists) to visualize protein structures in different types of viewer in 3D. Users can select the PDB id they want to visualize and the visualizer fetches PDBs from the rcsb org. It can also be used as standalone tool to integrate in any web application.

Licence

MIT

To set up locally for development

  1. Clone the repo
  2. cd bluegenes-protein-visualizer and then npm install to install dependencies.

All of the editable source files for css and js are in src. To bundle for prod, run the following commands:

CSS

Assuming less is installed globally:

npm run less

JS

Assuming webpack is installed globally:

Single build:
npm run build
Applied Coding practices / ESLint Rules:
  • indent: use tab (2 space tab) instead of spaces to not get an error.
  • linebreak-style: use \n for a newline, if you're on windows, configure it in your editor settings.
  • quotes: use single quote instead of double quote.
  • semi: use semi colon at end of each statement / expression / function definition.
  • comma-dangle: do not use dangling commas i.e. extra comma at the end of object values, function args, etc.). More about this here.
  • More pre-configured rules from eslint:recommended you must follow to not get errors here.
Developing:

To serve your code at localhost:3456 and rebuild it every time it changes, run:

npm run dev

bluegenes-protein-visualizer's People

Contributors

adrianbzg avatar akshatbhargava123 avatar bistaastha avatar heralden avatar jacobrreed avatar jgo613 avatar sakshisrivastava413 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bluegenes-protein-visualizer's Issues

Consider using ngl instead of pv

I don't remember if we chose pv over ngl for some specific reason, or we didn't know about ngl.

https://github.com/arose/ngl

NGL seems to be actively developed as opposed to abandoned (which pv is) and is used by RCSB. It uses the standard coloring scheme for secondary structure, and also shows a tooltip when hovering over the strands. I subjectively think the models look prettier as well. [=

If it's not too much work, we might swap out pv for ngl.

Here's a comparison between pv and ngl, respectively, using secondary structure coloring of 5VPZ.

2020-02-25-102531_340x368_scrot
2020-02-25-102526_448x392_scrot

Handle null response to PdbQuery

Sometimes searching for the primaryAccession we receive from intermine doesn't return any results from RCSB's PDB, and the JVA will crash due to passing null data to pv. (The JVA will suddenly disappear while showing the loading indicators.)

Can we show a suitable message when PDB doesn't return any results?
Suggestion: No results found for X in RCSB Protein Data Bank

One protein ID without results you can test with is 20840312.

Change protein selector to a dropdown

Sometimes, when the gene has a lot of proteins, the height of the protein visualizer is too big in BlueGenes. It would be better to have a dropdown to select the protein and a text over it saying something like "Choose a protein to be visualized".

Make React components usable if installed via NPM

Currently, the react components are not usable if we install the npm package for the tool. This is because JSX is compiled (only under src) using webpack during the build process which is fine so we need to export the "built" react component from our package.

It probably requires to re-configure some webpack configuration. This might be a useful link.

Set default viewer mode correctly

The view defaults to cartoon although the "Select Viewer Mode" dropdown is by default spline. This is confusing; we should have the dropdown show the actual default view cartoon.

Support more color operations

Similar to how we let the user select viewer mode, we should also give the user a dropdown to select color operations.

https://pv.readthedocs.io/en/v1.8.1/coloring.html#available-color-operations

We can start by supporting two color operations:

  • uniform (which is default now)
  • by secondary structure

According to the documentation I linked above, you can change to by secondary structure by calling pv.color.bySS(), and change back to uniform with pv.color.uniform().

When we have a color legend (#11) we will need to also update the legend based on the currently active color operation. For the new by secondary structure color operation, use the colors listed in these 3 tables.

Improve error messages

Instead of

Could not download PDB file, please try again later!

it would be useful to distinguish between the case "PDB has been contacted and there is some kind of communication (try again later)" and "we already know there is no relevant PDB (no 'try again later')".

As suggested by Gos.

[easy issue] Add preview.png to root of this repo.

If you would like to pick this issue up, please comment on the issue to let us know you're working on it :)

Task:

Add preview.png to the root of this repository

How to do this

  1. Go to the repo README, and follow instructions to clone and install this repository.
  2. Run npm run dev and visit http://localhost:3456
  3. Capture a screenshot of the application in action! Try to avoid extra/un-needed whitespace, and try to make it square-ish (this doesn't have to be exact).
  4. Save it in the root of this repo, commit it, and make a PR ๐ŸŽ‰

Context: these previews will be used here: http://bluegenes.apps.intermine.org/default/debug/tool-store - you can look for other repos under intermine to find similar tasks for other bluegenes-* repositories as several tools are missing previews.

What to do if you need help

Mention @yochannah, tweet @yoyehudi, pop by to say hi on chat or if needed email [email protected] <3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.