- Type Parameters:
C
- each element of theAlignedSequence
is aCompound
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, Paolo Pavan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.nbio.core.alignment.template.AlignedSequence
AlignedSequence.Step
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setLocationInAlignment
(Location location) Sets the position of theAlignedSequence
to the givenLocation
(start, gaps, end).void
shiftAtAlignmentLocation
(Location location, int shift) Slides a part of theAlignedSequence
.void
shiftAtSequenceLocation
(Location location, int shift) Slides a part of theAlignedSequence
.Methods inherited from interface org.biojava.nbio.core.sequence.template.Accessioned
getAccession
Methods inherited from interface org.biojava.nbio.core.alignment.template.AlignedSequence
clearCache, getAlignmentFromSequence, getAlignmentIndexAt, getCoverage, getEnd, getLocationInAlignment, getNumGapPositions, getNumGaps, getOriginalSequence, getOverlapCount, getSequenceFromAlignment, getSequenceIndexAt, getStart, isCircular, isGap
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.biojava.nbio.core.sequence.template.Sequence
countCompounds, getAsList, getCompoundAt, getCompoundSet, getIndexOf, getInverse, getLastIndexOf, getLength, getSequenceAsString, getSubSequence
-
Method Details
-
setLocationInAlignment
Sets the position of theAlignedSequence
to the givenLocation
(start, gaps, end).- Parameters:
location
- new location for this sequence- Throws:
IllegalArgumentException
- if location is invalid
-
shiftAtAlignmentLocation
Slides a part of theAlignedSequence
.- Parameters:
location
- portion of sequence moved in alignment coordinatesshift
- 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
Slides a part of theAlignedSequence
.- Parameters:
location
- portion of sequence moved in sequence coordinatesshift
- amount the alignment index changes for each contained element- Throws:
IllegalArgumentException
- if location is invalid or the shift causes a collision with stationary elements
-