Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/freezecoder/mutsneedle

R package for viewing mutation needle lollipop plot widgets
https://github.com/freezecoder/mutsneedle

Last synced: 27 days ago
JSON representation

R package for viewing mutation needle lollipop plot widgets

Awesome Lists containing this project

README

        

# Mutsneedle: An R package to generating interactive lolipop plots

Mutsneedle is an R version of the MutsNeedlePlot package developed by Michael Schroeder https://github.com/mpschr
In many bioinformatics/genomics task involving mutation inspection it is quite useful to explore the significant of certain alterations to a protein sequence.

Installation
==============

Firstly download and Install the package using devtools

```
library(devtools)
library(htmlwidgets)
install_github("freezecoder/mutsneedle")
```

It may not be necessary to include htmlwidgets with mutsneedle but this has not been tested.

Usage
==============

The mutsneedle function expects a data frame of mutation information for a particular gene. It can also accept domain/region information to annotate the lolipop plot.

```
mutsneedle(mutdata=exampleData(),domains=exampleRegionData())
```

![Rstudio mutsneedle](example_usage.png "Mutsneedle usage in Rstudio editor")

The mutdata input is an R data frame with the colums:

* coord - A string coordinate e.g. "11" , "1-10" are both valid
* category - String describing the category of the mutation
* value - numeric value

Other columns may be present in the dataframe but they will be ignored.

You may also insert a gene and transcript ID into the plot using the 'gene' and 'transcript' args to the mutsneedle function.

Usage in a Shiny App
=====================

The app is quite easy to call in Shiny thanks to the wonderful htmlwidgets package

```
library(shiny)
library(mutsneedle)
library(htmlwidgets)

shinyApp(
ui = mutsneedleOutput("id",width=800,height=500),
server = function(input, output) {
output$id <- renderMutsneedle(
data <- exampleMutationData()
regiondata <- exampleRegionData()
mutsneedle(mutdata=data,domains=regiondata)
)
}
)

```

More info Mutations Needle Plot (muts-needle-plot)
=================================================

A needle-plot (aka stem-plot or lollipop-plot) plots each data point as a big dot and adds a vertical line that makes it appear like a needle.

![DOI](https://zenodo.org/badge/7688/bbglab/muts-needle-plot.svg)

This software is **citable**! Different citation styles available at *http://dx.doi.org/*+DOI

Availability
-----------------------

* **Live examples** at the BioJS-registry:
* **Installable JavaScript library** at npm-registry:
* **Source code** at GitHub:

![Image of a Needle-Plot](mutations-needle-plot.png)

Examples (snippets)
----------------------

This library is can be found as npm-library in the BioJS registry.

Thus examples can bee seen at the biojs.net registry:

Issues
----------

Please report issues at:
Authors
--------

Original credit goes to Michael Schroeder and his group for the javascript version.

The R/HTMLWidgets credit is done by

**Zayed Albertyn**

+