use of org.biojava.bio.symbol.SymbolList in project ice by JBEI.
the class SequenceUtils method translateToProtein.
/**
* Calculate the amino acid translation of the given dnaSequence string.
*
* @param dnaSequence DNA sequence to translate.
* @return String of amino acid symbols.
* @throws UtilityException
*/
public static String translateToProtein(String dnaSequence) throws UtilityException {
SymbolList symL = null;
try {
symL = DNATools.createDNA(dnaSequence);
symL = DNATools.toProtein(symL);
} catch (IllegalSymbolException | IllegalAlphabetException e) {
throw new UtilityException(e);
}
return symL.seqString();
}
Aggregations