1.1.1 • Published 3 years ago

dnaviz v1.1.1

Weekly downloads
23
License
Apache-2.0
Repository
github
Last release
3 years ago

dnaviz

DNA visualization functions for Node, the browser, and beyond

CI/CD

A DNA visualization package for Node, the browser, and beyond. Using one of seven different methods, dnaviz allows you to convert any DNA or RNA sequence into meaningful two-dimensional visualizations.

Installation

via NPM:

$ npm install dnaviz

or via Yarn:

$ yarn add dnaviz

Usage

ES6 modules

import * as dnaviz from 'dnaviz';
dnaviz.squiggle('ATGC'); // => [[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]]

CommonJS

const dnaviz = require('dnaviz');
dnaviz.squiggle('ATGC'); // => [[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]]

Browser

<script src="dnaviz.min.js"></script>
<script>
  console.log(dnaviz.gates('ATGC'));
</script>

Available Visualization Methods

MethodsDescription
SquiggleBases converted into binary vector coordinates
YauBases converted into unit vectors based on the unit circle
Yau-BPSlight modification to Yau's method that ensures that the x axis is equivalent to the base position
Yau-IntYau-BP but with integer values
RandicAssigns each base a unique y-value
QiAssigns each 2-mer combination a unique y-value
GatesBases converted into 2D walks (up, down, left, and right)

Documentation

For specific functions and visualization methods, take a look at the documentation.

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0-2

4 years ago

1.0.0-1

4 years ago

1.0.0-0

4 years ago