Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Updating the CheckType function #1
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
Also I haven't checked if the unit tests work...