org.biojava3.alignment.template
Interface MutableAlignedSequence<S extends Sequence<C>,C extends Compound>

Type Parameters:
C - each element of the AlignedSequence is a Compound of type C
All Superinterfaces:
Accessioned, AlignedSequence<S,C>, Iterable<C>, Sequence<C>

public interface MutableAlignedSequence<S extends Sequence<C>,C extends Compound>
extends AlignedSequence<S,C>

Defines a mutable (editable) data structure for an AlignedSequence.

Author:
Mark Chapman

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava3.alignment.template.AlignedSequence
AlignedSequence.Step
 
Method Summary
 void setLocationInAlignment(Location location)
          Sets the position of the AlignedSequence to the given Location (start, gaps, end).
 void shiftAtAlignmentLocation(Location location, int shift)
          Slides a part of the AlignedSequence.
 void shiftAtSequenceLocation(Location location, int shift)
          Slides a part of the AlignedSequence.
 
Methods inherited from interface org.biojava3.alignment.template.AlignedSequence
clearCache, getAlignmentIndexAt, getEnd, getLocationInAlignment, getNumGaps, getOriginalSequence, getOverlapCount, getSequenceIndexAt, getStart, isCircular, isGap
 
Methods inherited from interface org.biojava3.core.sequence.template.Sequence
countCompounds, getAsList, getCompoundAt, getCompoundSet, getIndexOf, getInverse, getLastIndexOf, getLength, getSequenceAsString, getSubSequence
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface org.biojava3.core.sequence.template.Accessioned
getAccession
 

Method Detail

setLocationInAlignment

void setLocationInAlignment(Location location)
Sets the position of the AlignedSequence to the given Location (start, gaps, end).

Parameters:
location - new location for this sequence
Throws:
IllegalArgumentException - if location is invalid

shiftAtAlignmentLocation

void shiftAtAlignmentLocation(Location location,
                              int shift)
Slides a part of the AlignedSequence.

Parameters:
location - portion of sequence moved in alignment coordinates
shift - amount the alignment index changes for each contained element
Throws:
IllegalArgumentException - if location is invalid or the shift causes a collision with stationary elements

shiftAtSequenceLocation

void shiftAtSequenceLocation(Location location,
                             int shift)
Slides a part of the AlignedSequence.

Parameters:
location - portion of sequence moved in sequence coordinates
shift - amount the alignment index changes for each contained element
Throws:
IllegalArgumentException - if location is invalid or the shift causes a collision with stationary elements