Class Translator

    • 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
      • translateDNA3

        public String translateDNA3​(String dnaseq)
      • 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.