Class RnaSequenceView
java.lang.Object
org.biojava.nbio.core.sequence.template.SequenceProxyView<NucleotideCompound>
org.biojava.nbio.core.sequence.views.RnaSequenceView
- All Implemented Interfaces:
Iterable<NucleotideCompound>,Accessioned,ProxySequenceReader<NucleotideCompound>,Sequence<NucleotideCompound>,SequenceReader<NucleotideCompound>,SequenceView<NucleotideCompound>
public class RnaSequenceView
extends SequenceProxyView<NucleotideCompound>
implements ProxySequenceReader<NucleotideCompound>
Attempts to do on the fly translation of RNA by not requesting the compounds
until asked.
- Author:
- ayates
-
Constructor Summary
ConstructorsConstructorDescriptionRnaSequenceView(Sequence<NucleotideCompound> sourceDna) RnaSequenceView(Sequence<NucleotideCompound> sourceDna, CompoundSet<NucleotideCompound> rnaCompounds) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgetCompoundAt(int position) Returns the Compound at the given biological indexintgetIndexOf(NucleotideCompound compound) Scans through the Sequence looking for the first occurrence of the given compoundintgetLastIndexOf(NucleotideCompound compound) Scans through the Sequence looking for the last occurrence of the given compoundReturns the String representation of the SequencevoidsetCompoundSet(CompoundSet<NucleotideCompound> compoundSet) voidsetContents(String sequence) Methods inherited from class org.biojava.nbio.core.sequence.template.SequenceProxyView
countCompounds, equals, getAccession, getAsList, getBioEnd, getBioStart, getCompoundSet, getInverse, getLength, getSubSequence, getViewedSequence, hashCode, iterator, setBioEnd, setBioStartMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojava.nbio.core.sequence.template.Accessioned
getAccessionMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.biojava.nbio.core.sequence.template.Sequence
countCompounds, getAsList, getCompoundSet, getInverse, getLength, getSubSequence
-
Constructor Details
-
RnaSequenceView
-
RnaSequenceView
public RnaSequenceView(Sequence<NucleotideCompound> sourceDna, CompoundSet<NucleotideCompound> rnaCompounds)
-
-
Method Details
-
getSequenceAsString
Description copied from interface:SequenceReturns the String representation of the Sequence- Specified by:
getSequenceAsStringin interfaceSequence<NucleotideCompound>- Overrides:
getSequenceAsStringin classSequenceProxyView<NucleotideCompound>
-
getCompoundAt
Description copied from interface:SequenceReturns the Compound at the given biological index- Specified by:
getCompoundAtin interfaceSequence<NucleotideCompound>- Overrides:
getCompoundAtin classSequenceProxyView<NucleotideCompound>- Parameters:
position- Biological index (1 to n)- Returns:
- Compound at the specified position
-
getIndexOf
Description copied from interface:SequenceScans through the Sequence looking for the first occurrence of the given compound- Specified by:
getIndexOfin interfaceSequence<NucleotideCompound>- Overrides:
getIndexOfin classSequenceProxyView<NucleotideCompound>- Parameters:
compound- Compounds to look for- Returns:
- Index of the first position of the compound in the sequence (1 to n)
-
getLastIndexOf
Description copied from interface:SequenceScans through the Sequence looking for the last occurrence of the given compound- Specified by:
getLastIndexOfin interfaceSequence<NucleotideCompound>- Overrides:
getLastIndexOfin classSequenceProxyView<NucleotideCompound>- Parameters:
compound- Compounds to look for- Returns:
- Index of the last position of the compound in the sequence (1 to n)
-
getRnaToDna
-
getDnaToRna
-
buildTranslators
-
setCompoundSet
- Specified by:
setCompoundSetin interfaceSequenceReader<NucleotideCompound>
-
setContents
- Specified by:
setContentsin interfaceSequenceReader<NucleotideCompound>- Throws:
CompoundNotFoundException
-