Class RNAToAminoAcidTranslator
- java.lang.Object
-
- org.biojava.nbio.core.sequence.template.AbstractCompoundTranslator<NucleotideCompound,AminoAcidCompound>
-
- org.biojava.nbio.core.sequence.transcription.RNAToAminoAcidTranslator
-
- All Implemented Interfaces:
CompoundTranslator<NucleotideCompound,AminoAcidCompound>
public class RNAToAminoAcidTranslator extends AbstractCompoundTranslator<NucleotideCompound,AminoAcidCompound>
Takes aSequence
ofNucleotideCompound
which should represent an RNA sequence (RNASequence
is good for this) and returns a list ofSequence
which holdAminoAcidCompound
. The translator can also trim stop codons as well as changing any valid start codon to an initiating met.- Author:
- ayates
-
-
Constructor Summary
Constructors Constructor Description RNAToAminoAcidTranslator(SequenceCreatorInterface<AminoAcidCompound> creator, CompoundSet<NucleotideCompound> nucleotides, CompoundSet<Table.Codon> codons, CompoundSet<AminoAcidCompound> aminoAcids, Table table, boolean trimStops, boolean initMetOnly, boolean translateNCodons, boolean stopAtStopCodons, boolean waitForStartCodon)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Sequence<AminoAcidCompound>>
createSequences(Sequence<NucleotideCompound> originalSequence)
Performs the core conversion of RNA to Peptide.protected void
postProcessCompoundLists(List<List<AminoAcidCompound>> compoundLists)
Performs the trimming of stop codons and the conversion of a valid start amino acid to Mboolean
translateNCodons()
Indicates if we want to force exact translation of compounds or not i.e.protected void
trimStop(List<AminoAcidCompound> sequence)
Imperfect code.-
Methods inherited from class org.biojava.nbio.core.sequence.template.AbstractCompoundTranslator
addCompounds, addCompoundsToList, addCompoundToLists, addStrings, createSequence, getCreator, getFromCompoundSet, getToCompoundSet, translate, translateMany, workingListToSequences
-
-
-
-
Constructor Detail
-
RNAToAminoAcidTranslator
public RNAToAminoAcidTranslator(SequenceCreatorInterface<AminoAcidCompound> creator, CompoundSet<NucleotideCompound> nucleotides, CompoundSet<Table.Codon> codons, CompoundSet<AminoAcidCompound> aminoAcids, Table table, boolean trimStops, boolean initMetOnly, boolean translateNCodons, boolean stopAtStopCodons, boolean waitForStartCodon)
-
-
Method Detail
-
createSequences
public List<Sequence<AminoAcidCompound>> createSequences(Sequence<NucleotideCompound> originalSequence)
Performs the core conversion of RNA to Peptide. It does this by walking a windowed version of the given sequence. Any trailing DNA base pairs are ignored according to the specification ofWindowedSequence
.- Specified by:
createSequences
in interfaceCompoundTranslator<NucleotideCompound,AminoAcidCompound>
- Overrides:
createSequences
in classAbstractCompoundTranslator<NucleotideCompound,AminoAcidCompound>
-
postProcessCompoundLists
protected void postProcessCompoundLists(List<List<AminoAcidCompound>> compoundLists)
Performs the trimming of stop codons and the conversion of a valid start amino acid to M- Specified by:
postProcessCompoundLists
in classAbstractCompoundTranslator<NucleotideCompound,AminoAcidCompound>
-
trimStop
protected void trimStop(List<AminoAcidCompound> sequence)
Imperfect code. Checks the last amino acid to see if a codon could have translated a stop for it. Left in for the moment
-
translateNCodons
public boolean translateNCodons()
Indicates if we want to force exact translation of compounds or not i.e. those with internal N RNA bases. This will cause a translation to an X amino acid
-
-