[Biojava-l] RNATools.translate

Keith James kdj@sanger.ac.uk
05 Sep 2001 09:28:45 +0100


>>>>> "Greg" == Cox, Greg <gcox@netgenics.com> writes:

[...]

    Greg> It seems that there's an additional step of translating the
    Greg> RNA strand into codons before it can be translated into
    Greg> amino acids.

You're right. Something along the lines of

StrandedFeature f = (StrandedFeature) fi.next();

SymbolList rna = RNATools.transcribe(f.getSymbols());

SymbolList codons = SymbolListViews.windowedSymbolList(rna, 3);

SymbolList translation =
     SymbolListViews.translate(codons,
                               RNATools.getGeneticCode("UNIVERSAL"));

is needed. After the various Perl APIs it made me do a double-take.


Keith

-- 

-= Keith James - kdj@sanger.ac.uk - http://www.sanger.ac.uk/Users/kdj =-
The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs CB10 1SA