[Biojava-l] Reverse transcription

mark.schreiber at novartis.com mark.schreiber at novartis.com
Mon Aug 15 05:27:10 EDT 2005


Surprisingly there is not a method ro reverseTranslation in RNATools, I 
might add one. It does however give a nice opportunity to see how biojava 
translates symbols from one Alphabet to another.

You would do it like this:

public static SymbolList rt(SymbolList rna) 
      throws IllegalSymbolException, IllegalAlphabetException{
 
        ReversibleTranslationTable rtt = RNATools.transcriptionTable();
        Symbol[] syms = new Symbol[rna.length()];
 
        //reverse RNA
        rna = SymbolListViews.reverse(rna);
 
        for(int i = 1; i <= rna.length(); i++){
            syms[i-1] = rtt.untranslate(rna.symbolAt(i));
        }
 
        SymbolListFactory fact = new SimpleSymbolListFactory();
 
        SymbolList dna = fact.makeSymbolList(syms, syms.length, 
rtt.getSourceAlphabet());
        System.out.println(dna.toString());
 
        return dna;
    } 

The key interface is the ReversibleTranslationTable. TranslationTable (the 
parent interface) has a method to translate a Symbol from one alpha to 
another. A ReversibleTranslationTable extends this by providing a second 
method to untranslate. The RNATools.transcriptionTable maps DNA to RNA. 
The untranslate method does the opposite.

Anyone want to wirte that up for Biojava in Anger?

- Mark





Jacob Rohde <rohdester at gmail.com>
Sent by: biojava-l-bounces at portal.open-bio.org
08/15/2005 04:26 PM

 
        To:     biojava-l at biojava.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        Re: [Biojava-l] Reverse transcription


Hi,

On 8/15/05, mark.schreiber at novartis.com <mark.schreiber at novartis.com> 
wrote:
> Take a look at http://www.biojava.org/docs/bj_in_anger/ReverseComplement.htm
> 
> 
>

Thanks for you replies Mark.

Yes, I've read about the reverseComplement. It may be I'm dense here,
but I can't see how it can help me go from RNA to DNA. The way I
understand reverseComplement is that it gives the complementary strand
of the argument in the reverse order (5'-3'), but in the same
alphabet.

I need to go from RNA to DNA. Again, I might be overlooking something?!?!

On 8/15/05, mark.schreiber at novartis.com <mark.schreiber at novartis.com> 
wrote:
>See also DNATools.transcribeToRNA(), especially read the >javadocs and
>contrast that with DNATools.toRNA().

Yes, I can see the difference. transcribeToRNA() assumes the argument
is the template strand in the 5'-3' direction whereas   toRNA() takes
the coding strand as argument (it simply translates the alphabet
without any consideration of an actual transcription event).

/Jacob

_______________________________________________
Biojava-l mailing list  -  Biojava-l at biojava.org
http://biojava.org/mailman/listinfo/biojava-l





More information about the Biojava-l mailing list