Reformat.js is a small javascript library for format conversions.
Are you using reformat.js? Please consider opening a pull request to list your organization here:
The converter covers the following formats:
fasta
, clustal
, phylip
, stockholm
, pir
, embl
, genbank
, a3m
, nexus
You will need to include jQuery in order to use this library.
e.g. fasta
: Returns the sequence as fasta.
var fasta = $('#myClustal').reformat('fasta');
getGIs
: Returns GI numbers.
var giArray = $('#mySequences').reformat('getgis');
consensus
: Returns the consensus sequence of an alignment as a string.
var consensus = $('#myAlignment').reformat('consensus');
alignment
: Validates if input is alignment
$('#mySequences').reformat('alignment');
type
: validates type of input sequence, either DNA, RNA, Protein or undefined
$('#mySequences').reformat('type');
detect
: Returns the format of an input as a string.
var format = $('#mySequences').reformat('detect');
validate
: Validates an input format.
$('#mySequences').validate('fasta'); // returns either true or false
alphabet
: Returns the alphabet of an input.
$('#mySequences').reformat('alphabet'); // returns the characters which occur in a sequence or an alignment in alphabetical order
freq
: Returns the relative frequencies of amino acids compared to literature values.
$('#mySequences').reformat('freq'); // returns the relative frequencies of amino acids compared to literature values
Reformat.js was partially inspired by Sebastian Wilzbach's clustal parser