neXtProt protein sequence viewer (javascript) - From SIB CALIPHO group; neXtProt project
Clone or download
Latest commit 7f13606 May 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets modify readme Jul 22, 2015
build fixing apiurl Feb 16, 2018
css
dist
examples
lib correct merge errors Nov 4, 2015
snippets
src fixing apiurl Feb 16, 2018
test
.gitignore adding diet package Mar 17, 2015
.travis.yml update documentation, add travis.yml Apr 7, 2016
Gruntfile.js
README.md Update README.md May 29, 2018
bower.json
package.json Release v0.2.35 Feb 16, 2018

README.md

neXtProt - The knowledge resource on human proteins

This is a code repository for the SIB - Swiss Institute of Bioinformatics CALIPHO group neXtProt project

See: https://www.nextprot.org/

neXtProt sequence viewer

Build Status

The sequence viewer is a super easy javascript library to use in order to draw a protein sequence in a readable way.

Sequence viewer1

Live demo: https://cdn.rawgit.com/calipho-sib/sequence-viewer/master/examples/index.html

Simple example: https://cdn.rawgit.com/calipho-sib/sequence-viewer/master/examples/simple.html

Getting Started

  1. Include the library using bower or npm or simply by including the javascript sequence-viewer.js
//BOWER//
bower install sequence-viewer

//NODE//
npm install sequence-viewer
  1. Specify a div in your html
<div id="sequence-viewer"></div>
  1. Create an instance of Sequence in javascript and apply the render method
//For Node add before : var Sequence = require("sequence-viewer"); //


var seq = new Sequence('MALWMRLLPLLALLALWGPGPGAGSLQPLALEGSLQKRGIVEQCCTSICSLYQLENYCN');
// Render the sequence with or without rendering options
// (Check the interactive documentation)
seq.render('#sequence-viewer');
  1. Et voila!

Sequence viewer2

Note: if you choose the later approach with only the main javascript you should also include the dependencies, jquery,handlebars and bootstrap.min.css

Documentation

Check out this interactive page for a better understanding of how to use the sequence viewer and its possibilities :

Options

  • Show chars per line
  • Wrap lines
  • Highlight
  • Coverage
  • Labels
  • Toolbar (chars per line)
  • Search
  • Title
  • sequenceMaxHeight
  • Events
  • Badge

Examples

https://search.nextprot.org/entry/NX_P01308/structures

Support

If you have any problem or suggestion please open an issue here.

Development

git clone https://github.com/calipho-sib/sequence-viewer.git

npm install (will install the development dependencies)

bower install (will install the browser dependencies)

...make your changes and modifications...

npm run dist (will create the min & bundle versions in dist/)

npm run build (will create the bundle js & css in build/ for node)

grunt bump (will push and add a new release)

npm publish (will publish in npm)

License

This software is licensed under the GNU GPL v2 license, quoted below.

Copyright (c) 2015, SIB Swiss Institute of Bioinformatics