Class DNAToRNATranslator
java.lang.Object
org.biojava.nbio.core.sequence.template.AbstractCompoundTranslator<NucleotideCompound,NucleotideCompound>
org.biojava.nbio.core.sequence.transcription.DNAToRNATranslator
- All Implemented Interfaces:
CompoundTranslator<NucleotideCompound,
NucleotideCompound>
public class DNAToRNATranslator
extends AbstractCompoundTranslator<NucleotideCompound,NucleotideCompound>
Performs the first stage of transcription by going from DNA to RNA. This
class will first delegate to
Frame
in order to be in the correctly
specified translation frame and then translates T to U. The other
translation carried out is to convert an equivalent compound in DNA to RNA
i.e. for the base A in DNA fetching the equivalent A base in the RNA
CompoundSet
.- Author:
- ayates
-
Constructor Summary
ConstructorDescriptionDNAToRNATranslator
(SequenceCreatorInterface<NucleotideCompound> rnaCreator, CompoundSet<NucleotideCompound> dna, CompoundSet<NucleotideCompound> rna, boolean shortCutTranslation) -
Method Summary
Modifier and TypeMethodDescriptioncreateSequence
(Sequence<NucleotideCompound> originalSequence) createSequence
(Sequence<NucleotideCompound> originalSequence, Frame frame) createSequences
(Sequence<NucleotideCompound> originalSequence) Overloaded local version which delegates to an optional translator when told to (specified during construction).protected void
postProcessCompoundLists
(List<List<NucleotideCompound>> compoundLists) protected RNASequence
Takes in the given DNA Sequence and returns an instance of RNASequence which is usingRnaSequenceView
as aProxySequenceReader
.Methods inherited from class org.biojava.nbio.core.sequence.template.AbstractCompoundTranslator
addCompounds, addCompoundsToList, addCompoundToLists, addStrings, getCreator, getFromCompoundSet, getToCompoundSet, translate, translateMany, workingListToSequences
-
Constructor Details
-
DNAToRNATranslator
public DNAToRNATranslator(SequenceCreatorInterface<NucleotideCompound> rnaCreator, CompoundSet<NucleotideCompound> dna, CompoundSet<NucleotideCompound> rna, boolean shortCutTranslation)
-
-
Method Details
-
createSequences
public List<Sequence<NucleotideCompound>> createSequences(Sequence<NucleotideCompound> originalSequence) Overloaded local version which delegates to an optional translator when told to (specified during construction).- Specified by:
createSequences
in interfaceCompoundTranslator<NucleotideCompound,
NucleotideCompound> - Overrides:
createSequences
in classAbstractCompoundTranslator<NucleotideCompound,
NucleotideCompound> - Parameters:
originalSequence
- The DNA sequence to translate- Returns:
- The translated single sequence
-
wrapToRna
Takes in the given DNA Sequence and returns an instance of RNASequence which is usingRnaSequenceView
as aProxySequenceReader
. -
createSequence
public Sequence<NucleotideCompound> createSequence(Sequence<NucleotideCompound> originalSequence, Frame frame) -
createSequence
- Specified by:
createSequence
in interfaceCompoundTranslator<NucleotideCompound,
NucleotideCompound> - Overrides:
createSequence
in classAbstractCompoundTranslator<NucleotideCompound,
NucleotideCompound>
-
postProcessCompoundLists
- Specified by:
postProcessCompoundLists
in classAbstractCompoundTranslator<NucleotideCompound,
NucleotideCompound>
-