Project

ngs_server

0.0
No commit activity in last 3 years
No release in over 3 years
"Converts BAM/VCF files into JSON for consumption by web apps"
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 1
>= 1.2
>= 1.2
 Project Readme

#Ultralightweight NGS Server

Converts BAM and VCF files to json for consumption by a web application

install for mac and linux (no windows)

  1. download and install cmake

  2. run "gem install ngs_server" in the terminal

usage

  # in terminal
  ngs_server --help
  
  # add data directories to be served
  ngs_server add path-to-dir
  
  # start server
  ngs_server start
  ngs_server start --port 3000
  # daemonize
  ngs_server start -d
  
  # stop server if daemonized
  ngs_server stop

access data

see available data sources


invoke file: hg18.bam with coordinates 1 to 100000 on chromosome 22


vcf files must be compressed with index (see tabix)
invoke file: genotypes.vcf.gz with coordinates 1073361 to 1238825 on chromosome 1

find data

find data sources that have been added

# ngs_server find <dir> <regex>
ngs_server find . *  # return everything

# return found data as link to view in Rover
ngs_server find . "*bam" -r 1:1:100000

# specify server url that ngs_server is running on
# so the correct links to sources will be generated
ngs_server find . "*bam" -r 1:1:100000 -s http://mydataserver.com

Example

# create data directory
mkdir example-data && cd example-data

# download bam file and index
wget http://bioinformatics.bc.edu/marthlab/download/small.bam
wget http://bioinformatics.bc.edu/marthlab/download/small.bam.bai

# add data directory to ngs_server to be served
cd ../
ngs_server add example-data/

# start server
ngs_server start -d

# find data
ngs_server find . "*bam"

# generate Rover url to view data
# -r chr:min:max
ngs_server find . "*bam" -r 22:14596532:14699000
# and then just paste the generate url into a browser

# to make things quicker you can open the link from
# the command line in Google Chrome (Mac only, but linux is similar)
open -a "Google Chrome" $(ngs_server find . "*bam" -r 22:14596532:14699000)

# to see the pure json that ngs_server sends
# paste following url in browser
# http://0.0.0.0:4569/json/bam/example-data/small.bam?min=14596532&max=14699000&segment=22

# stop server
ngs_server stop