# sequence-viewer

> A protein sequence viewer written in javascript

Latest version **0.2.18** (published 2016-08-19) · 0 weekly downloads

## Install

```sh
npm install sequence-viewer
pnpm add sequence-viewer
yarn add sequence-viewer
bun add sequence-viewer
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.18 |
| Published | 2016-08-19 |
| First published | 2015-07-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+9 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 52 |
| Maintainers | matschaeff, nextprot |
| Keywords | sib, isb, calipho, sequence, protein, nextprot, uniprot, viewer, biojs |

## Links

- npm: https://www.npmjs.com/package/sequence-viewer
- Repository: https://github.com/calipho-sib/sequence-viewer
- Issues: https://github.com/calipho-sib/sequence-viewer/issues
- npm.io page: https://npm.io/package/sequence-viewer

## Dependencies (5)

- [bower](https://npm.io/package/bower.md) ^1.3.12
- [jquery](https://npm.io/package/jquery.md) x.x.x
- [grunt-cli](https://npm.io/package/grunt-cli.md) ^0.1.13
- [handlebars](https://npm.io/package/handlebars.md) 3.0.2
- [biojs-events](https://npm.io/package/biojs-events.md) x.x.x

## Recent versions

- 0.2.18 (latest) — 2016-08-19
- 0.2.17 — 2016-04-08
- 0.2.15 — 2016-02-23
- 0.2.14 — 2016-01-27
- 0.2.13 — 2015-12-09
- 0.2.12 — 2015-11-30
- 0.2.11 — 2015-11-24
- 0.2.9 — 2015-11-04
- 0.2.8 — 2015-11-04
- 0.2.7 — 2015-10-31
- 0.2.6 — 2015-09-22
- 0.2.2 — 2015-07-22
- 0.2.1 — 2015-07-22
- 0.2.0 — 2015-07-22
- 0.1.9 — 2015-07-22
- … 6 more at https://npm.io/package/sequence-viewer/versions

## README

# neXtProt - The knowledge resource on human proteins

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

See: http://www.nextprot.org/

# neXtProt sequence viewer

[![Build Status](https://travis-ci.org/calipho-sib/sequence-viewer.svg?branch=master)](https://travis-ci.org/calipho-sib/sequence-viewer)

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

![Sequence viewer1](/assets/sequence-viewer-complete.png)

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
```

2) Specify a div in your html
```
<div id="sequence-viewer"></div>
```
3) Create an instance of Sequence in javascript and apply the render method
```javascript
//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');

```
4) Et voila!

![Sequence viewer2](/assets/sequence-viewer-simple.png)


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 :
* https://cdn.rawgit.com/calipho-sib/sequence-viewer/master/examples/index.html


## 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/view/proteomics](https://search.nextprot.org/entry/NX_P01308/view/proteomics)

## Support

If you have any problem or suggestion please open an issue [here](https://github.com/calipho-sib/sequence-viewer/issues).

## 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

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