|
| 1 | +# ProSeqViewer |
| 2 | + |
| 3 | +This is a code repository for the BioComputingUP ProSeqViewer project. |
| 4 | +Full documentation is work in progress and will be available at: https://biocomputingup.github.io/ProSeqViewer-documentation/. |
| 5 | + |
| 6 | +This version is based on [Typescript](https://www.typescriptlang.org/) and compatible with [Angular 2+](https://angular.io/) framework. |
| 7 | + |
| 8 | +Represent biological data with the ProSeqVieweriewer library! Used in [MobiDB](http://mobidb.bio.unipd.it/), |
| 9 | +[DisProt](http://www.disprot.org/) and [RepeatsDB](http://repeatsdb.bio.unipd.it/). |
| 10 | + |
| 11 | +## Dependencies |
| 12 | + |
| 13 | +* [Typescript](https://www.typescriptlang.org/) |
| 14 | + |
| 15 | + |
| 16 | +[comment]: <> (## Output demo) |
| 17 | + |
| 18 | +[comment]: <> () |
| 19 | + |
| 20 | +## Getting started |
| 21 | + |
| 22 | +1 Install the library using npm |
| 23 | +``` |
| 24 | +npm install sequence-viewer-typescript |
| 25 | +``` |
| 26 | + |
| 27 | +2 Import the ProSeqViewer in javascript or your angular component |
| 28 | +```typescript |
| 29 | +import {ProSeqViewer} from 'sequence-viewer-typescript/dist'; |
| 30 | +``` |
| 31 | + |
| 32 | +3 Optional: if you are installing the feature viewer in an Angular 2+ based App, you may |
| 33 | +need to load the feature viewer stylesheet in your angular.json "styles" to |
| 34 | +ensure the correct prioritization of stylesheets. |
| 35 | +```json |
| 36 | +styles: [ |
| 37 | + "./node_modules/proseqviewer/dist/assets/sqv.scss" |
| 38 | +] |
| 39 | +``` |
| 40 | + |
| 41 | +4 Place the ProSeqViewer in your html |
| 42 | +```html |
| 43 | + <div id="psv"></div> |
| 44 | +``` |
| 45 | + |
| 46 | +5 Create an instance of the ProSeqViewer in javascript and style it |
| 47 | +```typescript |
| 48 | +this.proseqviewer = new ProSeqViewer('psv'); |
| 49 | +``` |
| 50 | + |
| 51 | +6 Add inputs -- here an example with minimum required input, for the full list of input settings options check GitHub documentation --. |
| 52 | +```typescript |
| 53 | + this.sequences = [{sequence: 'DFRLE--F---'}] |
| 54 | +``` |
| 55 | +7 Execute the function to draw the ProSeqVieweriewer on the page |
| 56 | +```typescript |
| 57 | + this.proseqviewer.draw(this.sequences); |
| 58 | +``` |
| 59 | + |
| 60 | +## Support |
| 61 | + |
| 62 | +If you have any problem or suggestion please open an issue. |
| 63 | + |
| 64 | +## License |
| 65 | + |
| 66 | +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public |
| 67 | +License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later |
| 68 | +version. |
0 commit comments