A DNA visualization npm package for the command line, browser, and beyond. Using six different methods, convert any DNA or RNA sequence into meaningful and analyzable datasets.
Via npm
$ npm install dnaviz
or Via Yarn
$ yarn add dnaviz
import * as dna from 'dnaviz';
const dna = require('dnaviz')
<script src="dnaviz.min.js"></script>
<script>
console.log(dnaviz.gates('ATGC'));
</script>
import * as dna from 'dnaviz';
dna.squiggle('ATGC')
// returns [[0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4], [0, 0.5, 0, -0.5, -1, -0.5, 0, -0.5, 0]]
Methods | Description |
---|---|
Squiggle | Bases converted into binary vector coordinates |
Yau | Bases converted into unit vectors based on the unit circle |
Yau-BP | Slight modification to Yau's method that ensures that the x axis is equivalent to the base position |
Randic | Assigns each base a unique y-value |
Qi | Assigns each 2-mer combination a unique y-value |
Gates | Bases converted into 2D-walks (up, down, left, and right) |
For specific functions and methods of visualization, take a look at the documentation