org.biojava3.core.sequence
Class DNASequence

java.lang.Object
  extended by org.biojava3.core.sequence.template.AbstractSequence<NucleotideCompound>
      extended by org.biojava3.core.sequence.DNASequence
All Implemented Interfaces:
Iterable<NucleotideCompound>, Accessioned, Sequence<NucleotideCompound>
Direct Known Subclasses:
CDSSequence, ChromosomeSequence, ExonSequence, GeneSequence, IntronSequence, StartCodonSequence, StopCodonSequence, TranscriptSequence

public class DNASequence
extends AbstractSequence<NucleotideCompound>

This is class should model the attributes associated with a DNA sequence

Author:
Scooter Willis

Nested Class Summary
static class DNASequence.DNAType
          The type of DNA sequence
 
Nested classes/interfaces inherited from class org.biojava3.core.sequence.template.AbstractSequence
AbstractSequence.AnnotationType
 
Constructor Summary
DNASequence()
          Shouldn't be used but makes it bean happy
DNASequence(SequenceReader<NucleotideCompound> proxyLoader)
          Create a sequence where the actual storage of the sequence data is somewhere else
DNASequence(SequenceReader<NucleotideCompound> proxyLoader, CompoundSet<NucleotideCompound> compoundSet)
          Create a sequence from a ProxySequencereader and user defined compound set
DNASequence(String seqString)
          String is king and create a sequence from DNA with default DNA compound set
DNASequence(String seqString, CompoundSet<NucleotideCompound> compoundSet)
          Create a sequence from a string with user defined compound set
 
Method Summary
 SequenceView<NucleotideCompound> getComplement()
          Returns a Sequence which will complement every base
 DNASequence.DNAType getDNAType()
           
 int getGCCount()
          Get the GC count in the DNA Sequence
 SequenceView<NucleotideCompound> getReverse()
          Returns a Sequence which runs in the current reverse order
 SequenceView<NucleotideCompound> getReverseComplement()
          Delegates to AbstractSequence.getInverse() for the reverse complement
 RNASequence getRNASequence()
          Return the RNASequence equivalent of the DNASequence using default Transcription Engine.
 RNASequence getRNASequence(Frame frame)
          Allows the user to pass in the Frame shift.
 RNASequence getRNASequence(TranscriptionEngine engine)
          Allow a user to pass in a rules engine to do the DNA to RNA translation
 RNASequence getRNASequence(TranscriptionEngine engine, Frame frame)
           
static void main(String[] args)
           
 void setDNAType(DNASequence.DNAType dnaType)
           
 
Methods inherited from class org.biojava3.core.sequence.template.AbstractSequence
addFeature, addFeature, addNote, countCompounds, getAccession, getAnnotationType, getAsList, getBioBegin, getBioEnd, getCompoundAt, getCompoundSet, getDatabaseReferences, getDescription, 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, 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
 

Constructor Detail

DNASequence

public DNASequence()
Shouldn't be used but makes it bean happy


DNASequence

public DNASequence(String seqString)
String is king and create a sequence from DNA with default DNA compound set

Parameters:
seqString -

DNASequence

public DNASequence(SequenceReader<NucleotideCompound> proxyLoader)
Create a sequence where the actual storage of the sequence data is somewhere else

Parameters:
proxyLoader -

DNASequence

public DNASequence(String seqString,
                   CompoundSet<NucleotideCompound> compoundSet)
Create a sequence from a string with user defined compound set

Parameters:
seqString -
compoundSet -

DNASequence

public DNASequence(SequenceReader<NucleotideCompound> proxyLoader,
                   CompoundSet<NucleotideCompound> compoundSet)
Create a sequence from a ProxySequencereader and user defined compound set

Parameters:
proxyLoader -
compoundSet -
Method Detail

getRNASequence

public RNASequence 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

public RNASequence getRNASequence(TranscriptionEngine engine)
Allow a user to pass in a rules engine to do the DNA to RNA translation

Parameters:
engine -
Returns:
RNA sequence

getRNASequence

public RNASequence getRNASequence(Frame frame)
Allows the user to pass in the Frame shift.

Parameters:
frame -
Returns:
rna sequence

getRNASequence

public RNASequence getRNASequence(TranscriptionEngine engine,
                                  Frame frame)

getGCCount

public int getGCCount()
Get the GC count in the DNA Sequence

Returns:
GC count

getReverse

public SequenceView<NucleotideCompound> getReverse()
Returns a Sequence which runs in the current reverse order


getComplement

public SequenceView<NucleotideCompound> getComplement()
Returns a Sequence which will complement every base


getReverseComplement

public SequenceView<NucleotideCompound> getReverseComplement()
Delegates to AbstractSequence.getInverse() for the reverse complement


getDNAType

public DNASequence.DNAType getDNAType()
Returns:
the dnaType

setDNAType

public void setDNAType(DNASequence.DNAType dnaType)
Parameters:
dnaType - the dnaType to set

main

public static void main(String[] args)