|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.man.bioinf.sequence.group.AbstractGappedSequenceGroup | +--uk.ac.man.bioinf.sequence.group.GroupSequenceAlignment
GroupSequenceAlignment.java This is a sequence group which also reflects a sequence alignment. The sequences will be given out in the same order, as they are in the SequenceAlignment. A given group is linked specifically to a single SequenceAlignment. If sequences are removed from the SequenceAlignment then they are automatically removed from this class. Created: Thu Jun 1 23:20:37 2000
Constructor Summary | |
GroupSequenceAlignment(SequenceAlignment alignment)
Start an empty sequence group associated with the given sequence alignment. |
|
GroupSequenceAlignment(SequenceAlignment alignment,
IntArrayList seqArray)
Starts an Sequence group with the sequences given in the IntArrayList |
Method Summary | |
void |
addAlignmentListener(AlignmentListener listener)
Add a listener specifically interested in events connected with the MSA. |
void |
addSequence(GappedSequence seq,
int inset)
Adds a sequence to the current alignment. |
void |
addSequenceListener(SequenceListener listener)
Adds the specified sequence listener. |
void |
addSequenceToGroup(Sequence sequence)
Adds a sequence to this group. |
void |
addVetoableAlignmentListener(VetoableAlignmentListener listener)
Adds a listener interested in vetoing multiple sequence alignment specific events. |
void |
addVetoableSequenceListener(VetoableSequenceListener listener)
Adds the specified vetoable sequence listener. |
void |
changeOccurred(AlignmentEvent event)
method signalled after a change has occured to a multiple alignment |
void |
changeOccurred(SequenceEvent event)
Method called when a change occurs |
void |
clearSequences()
Empty the group of sequences |
boolean |
containsSequence(Sequence sequence)
Does this group contain the sequence |
Identifier |
getIdentifier()
|
int |
getInset(int index)
Returns the inset of sequence within the alignment. |
int |
getLength()
Returns the length of the alignment (i.e: the longest sequence). |
int |
getNumberSequences()
Returns the total number of sequences in the alignment. |
GappedSequence |
getSequenceAt(int index)
Provides the sequence at a particular location in the alignment. |
int |
getSequenceIndex(GappedSequence sequence)
Returns the index in the alignment of a provided sequence. |
Sequence[] |
getSequences()
Get all the sequences in this group. |
SequenceType |
getSequenceType()
Returns the sequence type of the alignment (e.g: protein sequences). |
SequenceAlignment |
getSubAlignment(int startPos,
int endPos,
int startSeq,
int endSeq)
Returns a sub-alignment, given the exact location in this alignment. |
SequenceAlignment |
getSubAlignment(SequenceAlignmentRectangle rect)
|
Iterator |
iterator()
Returns an iterator of all the sequences. |
void |
removeAlignmentListener(AlignmentListener listener)
Removes a multiple sequence alignment listener. |
GappedSequence |
removeSequence(int seqIndex)
Removes a sequence from the alignment. |
void |
removeSequenceFromGroup(Sequence sequence)
Removes a sequence from this group |
void |
removeSequenceListener(SequenceListener listener)
Removes the specified sequence listener. |
void |
removeVetoableAlignmentListener(VetoableAlignmentListener listener)
Removes a vetoable multiple sequence alignment listener. |
void |
removeVetoableSequenceListener(VetoableSequenceListener listener)
Removes the specified vetoable sequence listener. |
void |
setInset(int seqIndex,
int size)
Sets the inset of a sequence within the alignment. |
void |
vetoableChangeOccurred(VetoableAlignmentEvent event)
|
void |
vetoableChangeOccurred(VetoableSequenceEvent event)
Method signalled before a prospective change occurs |
Methods inherited from class uk.ac.man.bioinf.sequence.group.AbstractGappedSequenceGroup |
getGappedSequences |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GroupSequenceAlignment(SequenceAlignment alignment)
alignment
- the alignmentpublic GroupSequenceAlignment(SequenceAlignment alignment, IntArrayList seqArray)
alignment
- seqArray
- Method Detail |
public Sequence[] getSequences()
SequenceGroup
getSequences
in interface SequenceGroup
public void addSequenceToGroup(Sequence sequence)
addSequenceToGroup
in interface SequenceGroup
sequence
- the sequence
IllegalArgumentException
- if this sequence is not part of
the associated SequenceAlignmentpublic void addSequence(GappedSequence seq, int inset) throws AlignmentVetoException
SequenceAlignment
addSequence
in interface SequenceAlignment
seq
- the sequence to be addedinset
- the sequence inset
AlignmentVetoException
public int getLength()
SequenceAlignment
getLength
in interface SequenceAlignment
public void removeSequenceFromGroup(Sequence sequence)
SequenceGroup
removeSequenceFromGroup
in interface SequenceGroup
sequence
- the sequencepublic GappedSequence removeSequence(int seqIndex) throws AlignmentVetoException
SequenceAlignment
removeSequence
in interface SequenceAlignment
seqIndex
- the index of the sequence
AlignmentVetoException
public void setInset(int seqIndex, int size) throws AlignmentVetoException
SequenceAlignment
Special N.B.: This was put into the interface because it was felt that there would not be any instances when you would not wish to do this (apart from a read-only alignment, in which case there are ways and means).
setInset
in interface SequenceAlignment
seqIndex
- the index of the sequencesize
- the size of the inset
AlignmentVetoException
public void clearSequences()
SequenceGroup
clearSequences
in interface SequenceGroup
public int getNumberSequences()
SequenceAlignment
getNumberSequences
in interface SequenceAlignment
public boolean containsSequence(Sequence sequence)
SequenceGroup
containsSequence
in interface SequenceGroup
sequence
- the sequence
public Iterator iterator()
SequenceGroup
iterator
in interface SequenceGroup
public GappedSequence getSequenceAt(int index)
SequenceAlignment
getSequenceAt
in interface SequenceAlignment
index
- the index of the target sequence
public SequenceAlignment getSubAlignment(int startPos, int endPos, int startSeq, int endSeq)
SequenceAlignment
getSubAlignment
in interface SequenceAlignment
startPos
- the start position for the sub-alignment (i.e: x1)endPos
- the length of the sub alignmentstartSeq
- the first sequence in the current alignment to be
included in the sub-alignment (i.e: y1)
public SequenceAlignment getSubAlignment(SequenceAlignmentRectangle rect)
getSubAlignment
in interface SequenceAlignment
public SequenceType getSequenceType()
SequenceAlignment
getSequenceType
in interface SequenceAlignment
public int getInset(int index)
SequenceAlignment
getInset
in interface SequenceAlignment
index
- the sequence index
public int getSequenceIndex(GappedSequence sequence)
SequenceAlignment
getSequenceIndex
in interface SequenceAlignment
sequence
- the query sequence
public void removeAlignmentListener(AlignmentListener listener)
AlignmentEventProvider
removeAlignmentListener
in interface AlignmentEventProvider
listener
- the listener to be removedpublic void addAlignmentListener(AlignmentListener listener)
AlignmentEventProvider
addAlignmentListener
in interface AlignmentEventProvider
listener
- a multiple sequence alignment listenerpublic void removeVetoableAlignmentListener(VetoableAlignmentListener listener)
AlignmentEventProvider
removeVetoableAlignmentListener
in interface AlignmentEventProvider
listener
- the listener to be removedpublic void addVetoableAlignmentListener(VetoableAlignmentListener listener)
AlignmentEventProvider
addVetoableAlignmentListener
in interface AlignmentEventProvider
listener
- a vetoable multiple sequence alignment listenerpublic void changeOccurred(SequenceEvent event)
SequenceListener
changeOccurred
in interface SequenceListener
event
- public void vetoableChangeOccurred(VetoableSequenceEvent event) throws SequenceVetoException
VetoableSequenceListener
vetoableChangeOccurred
in interface VetoableSequenceListener
event
- the event
SequenceVetoException
- if the listener does not wish
the event to occur.public void changeOccurred(AlignmentEvent event)
AlignmentListener
changeOccurred
in interface AlignmentListener
event
- the event typepublic void vetoableChangeOccurred(VetoableAlignmentEvent event) throws AlignmentVetoException
AlignmentVetoException
public void addSequenceListener(SequenceListener listener)
SequenceEventProvider
addSequenceListener
in interface SequenceEventProvider
listener
- the sequence listenerpublic void removeSequenceListener(SequenceListener listener)
SequenceEventProvider
removeSequenceListener
in interface SequenceEventProvider
listener
- the sequence listenerpublic void addVetoableSequenceListener(VetoableSequenceListener listener)
SequenceEventProvider
addVetoableSequenceListener
in interface SequenceEventProvider
listener
- the vetoable sequence listenerpublic void removeVetoableSequenceListener(VetoableSequenceListener listener)
SequenceEventProvider
removeVetoableSequenceListener
in interface SequenceEventProvider
listener
- the vetoable sequence listenerpublic Identifier getIdentifier()
getIdentifier
in interface Identifiable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |