Package org.biojava.nbio.core.sequence
Class DNASequence
java.lang.Object
org.biojava.nbio.core.sequence.template.AbstractSequence<NucleotideCompound>
org.biojava.nbio.core.sequence.DNASequence
- All Implemented Interfaces:
Iterable<NucleotideCompound>
,Accessioned
,Sequence<NucleotideCompound>
- Direct Known Subclasses:
CDSSequence
,ChromosomeSequence
,ExonSequence
,GeneSequence
,IntronSequence
,StartCodonSequence
,StopCodonSequence
,TranscriptSequence
This is class should model the attributes associated with a DNA sequence
- Author:
- Scooter Willis
-
Nested Class Summary
Nested classes/interfaces inherited from class org.biojava.nbio.core.sequence.template.AbstractSequence
AbstractSequence.AnnotationType
-
Constructor Summary
ConstructorDescriptionShouldn't be used but makes it bean happyDNASequence
(String seqString) String is king and create a sequence from DNA with default DNA compound setDNASequence
(String seqString, CompoundSet<NucleotideCompound> compoundSet) Create a sequence from a string with user defined compound setDNASequence
(SequenceReader<NucleotideCompound> proxyLoader) Create a sequence where the actual storage of the sequence data is somewhere elseDNASequence
(SequenceReader<NucleotideCompound> proxyLoader, CompoundSet<NucleotideCompound> compoundSet) Create a sequence from a ProxySequencereader and user defined compound set -
Method Summary
Modifier and TypeMethodDescriptionReturns a Sequence which will complement every baseint
Get the GC count in the DNA SequenceReturns a Sequence which runs in the current reverse orderDelegates toAbstractSequence.getInverse()
for the reverse complementReturn the RNASequence equivalent of the DNASequence using default Transcription Engine.getRNASequence
(Frame frame) Allows the user to pass in the Frame shift.getRNASequence
(TranscriptionEngine engine) Allow a user to pass in a rules engine to do the DNA to RNA translationgetRNASequence
(TranscriptionEngine engine, Frame frame) static void
void
setDNAType
(DNASequence.DNAType dnaType) Methods inherited from class org.biojava.nbio.core.sequence.template.AbstractSequence
addFeature, addFeature, addNote, countCompounds, getAccession, getAnnotationType, getAsList, getBioBegin, getBioEnd, getCompoundAt, getCompoundSet, getDatabaseReferences, getDescription, getFeatureRetriever, getFeatures, getFeatures, getFeatures, getFeaturesByType, getFeaturesKeyWord, getIndexOf, getInverse, getLastIndexOf, getLength, getNotesList, getOriginalHeader, getParentSequence, getProxySequenceReader, getSequenceAsString, getSequenceAsString, getSequenceScore, getSource, getSubSequence, getTaxonomy, getUserCollection, iterator, removeFeature, removeNote, setAccession, setAnnotationType, setBioBegin, setBioEnd, setCompoundSet, setDatabaseReferences, setDescription, setFeatureRetriever, setFeaturesKeyWord, setNotesList, setOriginalHeader, setParentSequence, setProxySequenceReader, setSequenceScore, setSource, setTaxonomy, setUserCollection, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DNASequence
public DNASequence()Shouldn't be used but makes it bean happy -
DNASequence
String is king and create a sequence from DNA with default DNA compound set- Parameters:
seqString
-- Throws:
CompoundNotFoundException
-
DNASequence
Create a sequence where the actual storage of the sequence data is somewhere else- Parameters:
proxyLoader
-
-
DNASequence
public DNASequence(String seqString, CompoundSet<NucleotideCompound> compoundSet) throws CompoundNotFoundException Create a sequence from a string with user defined compound set- Parameters:
seqString
-compoundSet
-- Throws:
CompoundNotFoundException
-
DNASequence
public DNASequence(SequenceReader<NucleotideCompound> proxyLoader, CompoundSet<NucleotideCompound> compoundSet) Create a sequence from a ProxySequencereader and user defined compound set- Parameters:
proxyLoader
-compoundSet
-
-
-
Method Details
-
getRNASequence
Return the RNASequence equivalent of the DNASequence using default Transcription Engine. Not all species follow the same rules. If you don't know better use this method- Returns:
- RNA sequence
-
getRNASequence
Allow a user to pass in a rules engine to do the DNA to RNA translation- Parameters:
engine
-- Returns:
- RNA sequence
-
getRNASequence
Allows the user to pass in the Frame shift.- Parameters:
frame
-- Returns:
- rna sequence
-
getRNASequence
-
getGCCount
public int getGCCount()Get the GC count in the DNA Sequence- Returns:
- GC count
-
getReverse
Returns a Sequence which runs in the current reverse order -
getComplement
Returns a Sequence which will complement every base -
getReverseComplement
Delegates toAbstractSequence.getInverse()
for the reverse complement -
getDNAType
- Returns:
- the dnaType
-
setDNAType
- Parameters:
dnaType
- the dnaType to set
-
main
- Throws:
Exception
-