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 toFrame
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 RNACompoundSet
.- Author:
- ayates
-
-
Constructor Summary
Constructors Constructor Description DNAToRNATranslator(SequenceCreatorInterface<NucleotideCompound> rnaCreator, CompoundSet<NucleotideCompound> dna, CompoundSet<NucleotideCompound> rna, boolean shortCutTranslation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sequence<NucleotideCompound>
createSequence(Sequence<NucleotideCompound> originalSequence)
Sequence<NucleotideCompound>
createSequence(Sequence<NucleotideCompound> originalSequence, Frame frame)
List<Sequence<NucleotideCompound>>
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
wrapToRna(Sequence<NucleotideCompound> dna)
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 Detail
-
DNAToRNATranslator
public DNAToRNATranslator(SequenceCreatorInterface<NucleotideCompound> rnaCreator, CompoundSet<NucleotideCompound> dna, CompoundSet<NucleotideCompound> rna, boolean shortCutTranslation)
-
-
Method Detail
-
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
protected RNASequence wrapToRna(Sequence<NucleotideCompound> dna)
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
public Sequence<NucleotideCompound> createSequence(Sequence<NucleotideCompound> originalSequence)
- Specified by:
createSequence
in interfaceCompoundTranslator<NucleotideCompound,NucleotideCompound>
- Overrides:
createSequence
in classAbstractCompoundTranslator<NucleotideCompound,NucleotideCompound>
-
postProcessCompoundLists
protected void postProcessCompoundLists(List<List<NucleotideCompound>> compoundLists)
- Specified by:
postProcessCompoundLists
in classAbstractCompoundTranslator<NucleotideCompound,NucleotideCompound>
-
-