项目作者: zy4

项目描述 :
javascript bioinformatics format converter
高级语言: JavaScript
项目地址: git://github.com/zy4/reformat.js.git
创建时间: 2016-06-29T15:35:47Z
项目社区:https://github.com/zy4/reformat.js

开源协议:MIT License

下载


Reformat.js

Reformat.js is a small javascript library for format conversions.

Community

Adopters

Are you using reformat.js? Please consider opening a pull request to list your organization here:

Formats

The converter covers the following formats:
fasta, clustal, phylip, stockholm, pir, embl, genbank, a3m, nexus

Usage

You will need to include jQuery in order to use this library.

Methods

e.g. fasta: Returns the sequence as fasta.

  1. var fasta = $('#myClustal').reformat('fasta');

getGIs: Returns GI numbers.

  1. var giArray = $('#mySequences').reformat('getgis');

consensus: Returns the consensus sequence of an alignment as a string.

  1. var consensus = $('#myAlignment').reformat('consensus');

alignment: Validates if input is alignment

  1. $('#mySequences').reformat('alignment');

type: validates type of input sequence, either DNA, RNA, Protein or undefined

  1. $('#mySequences').reformat('type');

detect: Returns the format of an input as a string.

  1. var format = $('#mySequences').reformat('detect');

validate: Validates an input format.

  1. $('#mySequences').validate('fasta'); // returns either true or false

alphabet: Returns the alphabet of an input.

  1. $('#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.

  1. $('#mySequences').reformat('freq'); // returns the relative frequencies of amino acids compared to literature values

Attribution

Reformat.js was partially inspired by Sebastian Wilzbach’s clustal parser