1.0.43 • Published 3 years ago

sequence-viewer-typescript v1.0.43

Weekly downloads
23
License
ISC
Repository
-
Last release
3 years ago

TypeScript Sequence Viewer

Represent biological data with the sequence viewer library! Used in MobiDB, DisProt and RepeatsDB.

This is a code repository for the BioComputingUP Sequence Viewer project. Full documentation is available at: sequence-viewer-typescript.

This version is based on Typescript and compatible with Angular 2+ framework. A Javascript version of the package is also available (see the documentation at sequence-viewer-typescript for more info).

comment: <> (demo image) comment: <> (Sequence Viewer(https://github.com/mb925/sequence-viewer-typescript/blob/master/src/assets/sqvDemo.png))

Getting started

Javascript installation

  1. Download the sequence viewer stylesheet You can find the sqv.css file in the src/assets folder on this Github repo.

  2. Download the library code You can find the sqv-bundle.js file in the dist folder on this Github repo.

  3. In your index.html:

<head>
  <link rel="stylesheet" type="text/css" href="sqv.css">
</head>
<body>


<div id="sqv"></div>

<script src="sqv-bundle.js"></script>
<script>

  const seqs = [
    {sequence: 'MVLSPADKVGAH--RMFLSFPTTKTYF--LS', id: 1, label: 'sp|P69905|HBA_HUMAN'}
  ];
  // Create an instance of the sequence viewer in javascript
  const sequenceviewer = new SequenceViewer('sqv'); 
  sequenceviewer.draw(sequence);
  
</script>

</body>

Angular installation

1 Install the library using npm

npm install sequence-viewer-typescript

2 Import the sequence viewer in javascript or your angular component

import {SequenceViewer} from 'sequence-viewer-typescript/dist';

3 Load the feature viewer stylesheet in your angular.json "styles".

styles: [
    "./node_modules/sequence-viewer-typescript/dist/assets/sqv.css"
]

4 Place the sequence viewer in your html

 <div id="sqv"></div>

5 Create an instance of the sequence viewer in your component, add inputs and execute

 const seqs = [
  {sequence: 'MVLSPADKTNVGAH--RMFLSFPTTKTYF--LSHGG', id: 1, label: 'sp|P69905|HBA_HUMAN'}
  ];
  const sequenceviewer = new SequenceViewer('sqv');
  sequenceviewer.draw(sequence);

Compiler

This package ECMAScript target version is: es2015.

Dependencies

Development

git clone https://github.com/BioComputingUP/sequence-viewer-typescript.git

npm install (will install the development dependencies)

...make your changes and modifications...

npm run build (will create the bundle js files)

npm run postbuild (will move assets files in dist/)

npm run wp (will create the sqv-bundle.js file in dist/)

npm run post wp (will edit the bundle file to make it work)

This commands can be found in package.json

Support

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

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

1.0.39

3 years ago

1.0.38

3 years ago

1.0.40

3 years ago

1.0.43

3 years ago

1.0.42

3 years ago

1.0.41

3 years ago

1.0.36

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.31

3 years ago

1.0.30

3 years ago

1.0.29

3 years ago

1.0.28

3 years ago

1.0.27

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.19

3 years ago

1.0.20

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago