Package de.charite.compbio.jannovar.hgvs
Class Translator
- java.lang.Object
-
- de.charite.compbio.jannovar.hgvs.Translator
-
public final class Translator extends Object
This singleton class helps to translate DNA sequences.- Author:
- Peter N Robinson, Marten Jaeger, Manuel Holtgrewe
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Translator
getTranslator()
Factory method to get reference to Translator.String
toLong(char c)
String
toLong(String shortAASeq)
String
translateDNA(String dnaseq)
Translates a DNA sequence.String
translateDNA3(String dnaseq)
-
-
-
Method Detail
-
getTranslator
public static Translator getTranslator()
Factory method to get reference to Translator.- Returns:
Translator
singleton
-
translateDNA
public String translateDNA(String dnaseq)
Translates a DNA sequence. Assume the sequence is upper case with no ambiguous bases.Currently, there is no need to translate more than a single codon. However, some portions of the code are trying to translate DNA that is not a multiple of 3 nt long (from indel code). Therefore, we will translate as much as possible here. This may need refactoring in the future. (TODO).
- Parameters:
dnaseq
- A DNA sequence that is to be translated- Returns:
- corresonding aminoacid sequence
-
toLong
public String toLong(String shortAASeq)
- Parameters:
shortAASeq
- amino acid sequence with one-character representation of amino acids- Returns:
- String with long versions of short AA seqs.
-
toLong
public String toLong(char c)
- Parameters:
c
- short amino acid representation to conver to long representation- Returns:
- String with long versions of short AA char.
-
-