bionode/bionode-seq — pull request #1 by IsmailM (2014-09-22 15:31:23+00:00)
Title: Updating the CheckType function

Let me know what you think...

Here is a comparison between the original and the updated version... http://jsbin.com/fofadedopodu/1/edit?js,output

Note: Since ACGT are both bases and amino acid, it is sometime impossible to work out which type the sequence is... So this script checks if the sequence is DNA (or RNA) before, checking if it could be a protein (since for it to be a DNA or RNA sequence, there must be a higher percentage of ACGT). You can see an example of this problem in the above link...

BTW. I'm not too sure about line 10 on the test unit - is the `undefined` supposed to be in the apostrophes?

Also I haven't checked if the unit tests work...