Git Product home page Git Product logo

shiny.molstar's Introduction

shiny.molstar data.validator logo

R Shiny wrapper for Mol* (/'molstar/) - A visualization toolkit of large-scale molecular data

R-CMD-checks

Based on Mol* (/'molstar/) and powered by shiny.react

We created a R Shiny wrapper based on shiny.react and molstar-react (node.js library) that gives all the powerful tools of Mol* open-source toolkit for visualization and analysis of large-scale molecular data.

This package exports three new components that can be used in a Shiny application.

  • Molstar creates a Molstar visualization of a protein using an URL to a valid filetype supported by Molstar or a "Protein Data Bank" id (pdbId). See more below for available databases to find a valid pdbId.
  • AlphaFoldMolstar similar to the Molstar component, but uses the UniProt id in the AlphaFold database to display the protein.
  • AlphaFoldDetails creates a component that retrieves details of an AlphaFold protein id (title, download links and a Predict Aligned Error image)

How to find a valid id or url?

A valid pdbId can be found in public databases such as:

The uniProtId can be found in any of the AlphaFold databases:

Getting started

To install the package, run:

remotes::install_github("Appsilon/shiny.molstar")

Take a look at basic example app to start working with shiny.molstar.

To learn about the Mol* language, follow the Viewer documentation.

Examples

A good way to learn more is to look at the examples. Once you install the library, you can run them with shiny.molstar::runExample function.

shiny.molstar::runExample("FullPage")
shiny.molstar::runExample("Minimal")
shiny.molstar::runExample("AlphaFold")
shiny.molstar::runExample("AlphaFoldDetails")

Full page example

Creating a full page viewer on a sample molecule (example also available at inst/examples/FullPage.R)

library(shiny)
library(shiny.molstar)

shinyApp(
  ui = tagList(
    tags$style(HTML("html, body { margin: 0; }")),
    Molstar(
      pdbId = "1LOL",
      useInterface = TRUE,
      showControls = TRUE,
      showAxis = TRUE
    )
  ),
  server = function(input, output) {
  }
)

Full page example

Using AlphaFold database and details

Running an example from the package (located at inst/examples/AlphaFoldDetails.R).

You can click on the button on the bottom of the example to get the minimal code to reproduce the same Shiny application (unstyled and without the footer).

shiny.molstar::runExample("AlphaFoldDetails")

AlphaFold with details

Appsilon

Appsilon is a Posit (formerly RStudio) Full Service Certified Partner.
Learn more at appsilon.com.

Get in touch [email protected]

Explore the Rhinoverse - a family of R packages built around Rhino!

We are hiring!

shiny.molstar's People

Contributors

averissimo avatar renovate[bot] avatar kamilzyla avatar jakubnowicki avatar mend-bolt-for-github[bot] avatar

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.