Class 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
  • Constructor Details

    • 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 Details

    • 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)