ngs-dashboard
v0.0.5
Published
Generic dashboard that updates plots automatically when local files change. Used currently for viewing Bioinformatics and NGS data at Radiant Genomics.
Downloads
6
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.
##Setup
Tested on Ubuntu 14, 15, and 16
Create .env file and setup data folder. See next sections for details.
Install and start the server.
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
- Create a file named
.env
in the folder from where you will be runningstart-dashboard-server
Example.env
file:
DATA_FOLDER=plates
CONFIG_FILE_NAME=.dashboard
- 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
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 folderln -s /mnt/md0/Henry/data/my-plate-A/ your-data-folder/plate-10
.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"