0.3.0 • Published 6 years ago
to-dna v0.3.0
to-dna
Transform strings to DNA and vice versa.
See Biomimicry book from Janine M. Benyus, Page 231-235.
Installation
npm i to-dna
Usage
toDNA
function
const { toDNA } = require('to-dna');
// toDNA :: string -> string
Example: toDNA('jeremy fourna')
will output AAGCAACAACACAACAAATAACGAACGGAACCAATGACCAACACAATCAAAA
.
toComplementaryDNA
function
const { toComplementaryDNA } = require('to-dna');
// toComplementaryDNA :: string -> string
Example: toComplementaryDNA('jeremy fourna')
will output TTCGTTGTTGTGTTGTTTATTGCTTGCCTTGGTTACTGGTTGTGTTAGTTTT
.
fromDNA
function
const { fromDNA } = require('to-dna');
// fromDNA :: string -> string
Example: fromDNA('AAGCAACAACACAACAAATAACGAACGGAACCAATGACCAACACAATCAAAA')
will output JEREMY FOURNA
.
fromCompletementaryDNA
function
const { fromCompletementaryDNA } = require('to-dna');
// fromCompletementaryDNA :: string -> string
Example: fromCompletementaryDNA('TTCGTTGTTGTGTTGTTTATTGCTTGCCTTGGTTACTGGTTGTGTTAGTTTT')
will output JEREMY FOURNA
.