Generate bio data from sunlight and alphabets
Install biomass
with npm:
$ npm install biomass
If you are using biomass
with Node.js, you can require the module:
var biomass = require('biomass');
Alternatively, just include biomass.min.js
via a <script/>
in your page.
<script src="../biomass.min.js"></script>
// Sequence functions will return between 10 and 100 characters if a length is not specified:
biomass.dna();
=> 'CATAGGGACCAAGCTCTGGGGAGCAACCCATAAGCACGACAATCGCGATAATACGTAGTACGCCGCTTGGTTCGTGCCTTCCCGCGCG'
biomass.rna();
=> 'GAGUAGGCUAGGCAUAGC'
biomass.dna({length: 15});
=> 'TTTTGTATGCGTACG'
biomass.rna({length: 3});
=> 'UAC'
biomass.rna({length: 3, case: "lower"});
=> 'uga'
biomass.protein();
=> 'YHAVPVPEEYWRWNTEDVCNTFECMEVINAYRNWFFWLQEFMGPERLPAHMYCHDASAPMMFQGCWDHEEKDMGCVGP'
biomass.protein({ambiguous: true});
=> 'FAFNDMLCXVYPRVQATLCLNNAPDIPSMGPKXFRRFLCYPFC'
- Added ambiguity to
biomass.dna
,biomass.rna
, andbiomass.protein
functions. Follows IUPAC notation for ambiguous nucleotides and X unknown amino acids.
- Added
biomass.protein
for generating random amino acid sequences. - Fix version number to adequately reflect updates
- Now
biomass.dna
andbiomass.rna
are case aware with a default response of uppercase letters.
Initial release
- Added
biomass.dna
for generating random DNA sequences. - Added
biomass.rna
for generating random RNA sequences.
Alan Rice <alanmrice@gmail.com> @alanmrice
biomass is licensed under the MIT license.
Check ChooseALicense.com for details.