Class RNAToAminoAcidTranslator
java.lang.Object
org.biojava3.core.sequence.template.AbstractCompoundTranslator<NucleotideCompound,AminoAcidCompound>
org.biojava3.core.sequence.transcription.RNAToAminoAcidTranslator
- All Implemented Interfaces:
CompoundTranslator<NucleotideCompound,
AminoAcidCompound>
public class RNAToAminoAcidTranslator
extends AbstractCompoundTranslator<NucleotideCompound,AminoAcidCompound>
Takes a
Sequence
of NucleotideCompound
which should represent an RNA sequence
(RNASequence
is good for this) and returns a list of Sequence
which hold
AminoAcidCompound
. The translator can also trim stop codons as well as changing any valid
start codon to an initiating met.- Author:
- ayates
-
Constructor Summary
ConstructorDescriptionRNAToAminoAcidTranslator
(SequenceCreatorInterface<AminoAcidCompound> creator, CompoundSet<NucleotideCompound> nucleotides, CompoundSet<Table.Codon> codons, CompoundSet<AminoAcidCompound> aminoAcids, Table table, boolean trimStops, boolean initMetOnly, boolean translateNCodons) -
Method Summary
Modifier and TypeMethodDescriptioncreateSequences
(Sequence<NucleotideCompound> originalSequence) Performs the core conversion of RNA to Peptide.boolean
Indicates if we want to force exact translation of compounds or not i.e. those with internal N RNA bases.Methods inherited from class org.biojava3.core.sequence.template.AbstractCompoundTranslator
createSequence, getCreator, getFromCompoundSet, getToCompoundSet, translate, translateMany
-
Constructor Details
-
RNAToAminoAcidTranslator
public RNAToAminoAcidTranslator(SequenceCreatorInterface<AminoAcidCompound> creator, CompoundSet<NucleotideCompound> nucleotides, CompoundSet<Table.Codon> codons, CompoundSet<AminoAcidCompound> aminoAcids, Table table, boolean trimStops, boolean initMetOnly, boolean translateNCodons)
-
-
Method Details
-
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>
-
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
-