org.biojava.bio.program.phred
Class PhredSequence

java.lang.Object
  extended by org.biojava.utils.AbstractChangeable
      extended by org.biojava.bio.seq.impl.SimpleSequence
          extended by org.biojava.bio.program.phred.PhredSequence
All Implemented Interfaces:
Serializable, Annotatable, Qualitative, FeatureHolder, RealizingFeatureHolder, Sequence, SymbolList, Changeable

public class PhredSequence
extends SimpleSequence
implements Qualitative

PhredSequence is an extension of SimpleSequence that implements Qualitative to hold Phred quality scores.

Copyright: Copyright (c) 2001

Company: AgResearch

Since:
1.1
Author:
Mark Schreiber
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
FeatureHolder.EmptyFeatureHolder
 
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
Annotatable.AnnotationForwarder
 
Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
FeatureHolder.EmptyFeatureHolder
 
Field Summary
 
Fields inherited from interface org.biojava.bio.symbol.SymbolList
EDIT, EMPTY_LIST
 
Fields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA
 
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
 
Fields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA
 
Constructor Summary
PhredSequence(SymbolList phredSequence, String name, String urn, Annotation anno)
          Constructs a new PhredSequence.
 
Method Summary
 SymbolList getDNA()
          Extracts the DNA part of the PhredAlpahbet SymbolList and returns it as a SymbolList
 Symbol getDNAAt(int index)
           
 SymbolList getQuality()
          Extracts the quality part if the Phred Alphabet and returns it as a SymbolList over the Integer SubAlphabet from 0..99.
 Symbol getQualityAt(int index)
          Retreives the quality symbol for the specified index.
 
Methods inherited from class org.biojava.bio.seq.impl.SimpleSequence
containsFeature, countFeatures, createFeature, createFeature, edit, featureHolderAllocated, features, filter, filter, getAlphabet, getAnnotation, getChangeSupport, getFeatureHolder, getName, getSchema, getURN, iterator, length, realizeFeature, removeFeature, seqString, setName, setURN, subList, subStr, symbolAt, toList, toString
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 

Constructor Detail

PhredSequence

public PhredSequence(SymbolList phredSequence,
                     String name,
                     String urn,
                     Annotation anno)
              throws IllegalAlphabetException
Constructs a new PhredSequence.

Parameters:
phredSequence - - a SymbolList over the Phred Alphabet.
name - - the name for the sequence.
urn - - the URN for the sequence.
anno - - the Annotation object for the sequence.
Throws:
IllegalAlphabetException
Method Detail

getQuality

public SymbolList getQuality()
Extracts the quality part if the Phred Alphabet and returns it as a SymbolList over the Integer SubAlphabet from 0..99.

Specified by:
getQuality in interface Qualitative

getDNA

public SymbolList getDNA()
Extracts the DNA part of the PhredAlpahbet SymbolList and returns it as a SymbolList


getQualityAt

public Symbol getQualityAt(int index)
                    throws IndexOutOfBoundsException
Description copied from interface: Qualitative
Retreives the quality symbol for the specified index.

Specified by:
getQualityAt in interface Qualitative
Parameters:
index - - Must be greater than zero.
Throws:
IndexOutOfBoundsException - if index is outside of the quality symbol list.

getDNAAt

public Symbol getDNAAt(int index)
                throws IndexOutOfBoundsException
Throws:
IndexOutOfBoundsException