# ngs-dashboard

> Generic dashboard that updates plots automatically when local files change. Used currently for viewing Bioinformatics and NGS data at Radiant Genomics.

Latest version **0.0.5** (published 2017-02-01) · 0 weekly downloads

## Install

```sh
npm install ngs-dashboard
pnpm add ngs-dashboard
yarn add ngs-dashboard
bun add ngs-dashboard
```

Provides the command `start-dashboard-server`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2017-02-01 |
| First published | 2017-01-24 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 58 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Deepak Chandran |
| Maintainers | dchandran |

## Links

- npm: https://www.npmjs.com/package/ngs-dashboard
- Repository: https://github.com/radiantgenomics/ngs-dashboard
- Homepage: https://github.com/radiantgenomics/ngs-dashboard.git#readme
- Issues: https://github.com/radiantgenomics/ngs-dashboard/issues
- npm.io page: https://npm.io/package/ngs-dashboard

## Dependencies (58)

- [d3](https://npm.io/package/d3.md) latest
- [cola](https://npm.io/package/cola.md) latest
- [less](https://npm.io/package/less.md) latest
- [path](https://npm.io/package/path.md) latest
- [react](https://npm.io/package/react.md) latest
- [colors](https://npm.io/package/colors.md) latest
- [dotenv](https://npm.io/package/dotenv.md) latest
- [expose](https://npm.io/package/expose.md) latest
- [lodash](https://npm.io/package/lodash.md) latest
- [moment](https://npm.io/package/moment.md) latest
- [yamljs](https://npm.io/package/yamljs.md) latest
- [express](https://npm.io/package/express.md) latest
- [webpack](https://npm.io/package/webpack.md) latest
- [babelify](https://npm.io/package/babelify.md) latest
- [passport](https://npm.io/package/passport.md) latest
- [r-script](https://npm.io/package/r-script.md) latest
- [node-uuid](https://npm.io/package/node-uuid.md) latest
- [react-ace](https://npm.io/package/react-ace.md) latest
- [react-dom](https://npm.io/package/react-dom.md) latest
- [babel-core](https://npm.io/package/babel-core.md) latest
- [css-loader](https://npm.io/package/css-loader.md) latest
- [fs-promise](https://npm.io/package/fs-promise.md) latest
- [react-list](https://npm.io/package/react-list.md) latest
- [url-loader](https://npm.io/package/url-loader.md) latest
- [body-parser](https://npm.io/package/body-parser.md) latest
- [es6-promise](https://npm.io/package/es6-promise.md) latest
- [file-loader](https://npm.io/package/file-loader.md) latest
- [rc-progress](https://npm.io/package/rc-progress.md) latest
- [react-mixin](https://npm.io/package/react-mixin.md) latest
- [react-modal](https://npm.io/package/react-modal.md) latest
- [babel-eslint](https://npm.io/package/babel-eslint.md) latest
- [babel-loader](https://npm.io/package/babel-loader.md) latest
- [react-iframe](https://npm.io/package/react-iframe.md) latest
- [style-loader](https://npm.io/package/style-loader.md) latest
- [flexbox-react](https://npm.io/package/flexbox-react.md) latest
- [mkdir-promise](https://npm.io/package/mkdir-promise.md) latest
- [react-widgets](https://npm.io/package/react-widgets.md) latest
- [passport-local](https://npm.io/package/passport-local.md) latest
- [react-dropdown](https://npm.io/package/react-dropdown.md) latest
- [react-dropzone](https://npm.io/package/react-dropzone.md) latest
- [deep-sort-object](https://npm.io/package/deep-sort-object.md) latest
- [fixed-data-table](https://npm.io/package/fixed-data-table.md) latest
- [react-codemirror](https://npm.io/package/react-codemirror.md) latest
- [react-search-bar](https://npm.io/package/react-search-bar.md) latest
- [react-simple-tab](https://npm.io/package/react-simple-tab.md) latest
- [react-split-pane](https://npm.io/package/react-split-pane.md) latest
- [pui-react-buttons](https://npm.io/package/pui-react-buttons.md) latest
- [pure-render-mixin](https://npm.io/package/pure-render-mixin.md) latest
- [react-burger-menu](https://npm.io/package/react-burger-menu.md) latest
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) latest
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) latest
- [font-awesome-webpack](https://npm.io/package/font-awesome-webpack.md) latest
- [react-expandable-nav](https://npm.io/package/react-expandable-nav.md) latest
- [passport-google-oauth](https://npm.io/package/passport-google-oauth.md) latest
- [react-loading-animation](https://npm.io/package/react-loading-animation.md) latest
- [directory-structure-json](https://npm.io/package/directory-structure-json.md) latest
- [babel-plugin-react-require](https://npm.io/package/babel-plugin-react-require.md) latest
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) latest

## Recent versions

- 0.0.5 (latest) — 2017-02-01
- 0.0.4 — 2017-01-24
- 0.0.3 — 2017-01-24
- 0.0.2 — 2017-01-24
- 0.0.1 — 2017-01-24

## README

# NGS Dashboard

Simple webapp showing statistics (plots and tables) from data files. The plots automatically update when files change.
The app can merge columns from multiple files and make additional calculations from the data, such as N50.

[MIT License](https://raw.githubusercontent.com/radiantgenomics/ngs-dashboard/master/LICENSE.txt)

![screenshot](https://raw.githubusercontent.com/radiantgenomics/ngs-dashboard/master/screenshot.png)

##Setup

Tested on Ubuntu 14, 15, and 16

1) Create .env file and setup data folder. See next sections for details.

2) Install and start the server.
```shell
npm install -g ngs-dashboard
#start new screen
start-dashboard-server
```
It best to start the server in a separate `screen` so that the web server keeps running and you can watch the console logs when needed.

##Create .env file
1) Create a file named `.env` in the folder from where you will be running `start-dashboard-server`
Example `.env` file:
```
DATA_FOLDER=plates
CONFIG_FILE_NAME=.dashboard
```

2) Inside the `.env` file, specify the location of the main data folder, e.g. `plates`, and the name of the configuration file, e.g. `.dashboard`. The main data folder will contain sub-folders (projects). Each project folder **must** contain a configuration file. Example configuration file in the next section.

##Setup data folder

1) The data set folder is a single folders containing project folders. In many cases, the project folders may be **symbolic links to the actual data folder**. For example, if `plate-10` is located in `/mnt/md0/Henry/data/my-plate-A/`, then you should use the following command to create a link inside the project folder `ln -s /mnt/md0/Henry/data/my-plate-A/ your-data-folder/plate-10`.

2) Each data set folder must contain a configuration file, e.g. `.dashboard`, which is described in the next section.

##Plots configuration file
Each data set must reside in a single folder, e.g. `plate-10`.
Each data set can contain multiple plots. These plots are specified using a configuration file, e.g. `.dashboard`.

The configuration file can be used to select specific files based on patterns and specific columns from those files.
The webapp will concatinate the selected columns.

In the below example, `website` type is a special type of display where the given url is displayed as an iframe.
The `calc` section is used to add extra on-the-fly data to the plot. In this case, the N50 values are automatically calculated from the data. You need to modify `calc.js` in order to add additional functions.

```
Contig Sizes:
  category: contigs
  type: boxplot
  files: "*.coverage.stats.tab"
  columns: 2..2
  ylabel: size
  ytype: log
  calc:
    - n50

Contig Fold Coverage:
  category: contigs
  type: boxplot
  files: "*.coverage.stats.tab"
  columns: 1..1
  ylabel: fold
  ytype: log

Read Counts:
  category: reads
  type: line
  files: "*.read_counts.tab"
  xlabel: stage
  ylabel: reads
  ytype: log

Quality Scores (forward):
  category: reads
  type: line
  files: "*.quality_scores.R1.tab"
  columns: 1..1
  xlabel: bps
  ylabel: scores

Quality Scores (reverse):
  category: reads
  type: line
  files: "*.quality_scores.R2.tab"
  columns: 1..1
  xlabel: bps
  ylabel: scores

GC Content:
  category: reads
  type: counts
  files: "*.GC.tab"
  xlabel: percent

FastQC:
  type: webpage
  url: "*.unmerged1_fastqc.html"

```

---
_Source: https://npm.io/package/ngs-dashboard · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
