|
||||||||||
| 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 alignment
public GroupSequenceAlignment(SequenceAlignment alignment,
IntArrayList seqArray)
alignment - seqArray - | Method Detail |
public Sequence[] getSequences()
SequenceGroup
getSequences in interface SequenceGrouppublic void addSequenceToGroup(Sequence sequence)
addSequenceToGroup in interface SequenceGroupsequence - the sequence
IllegalArgumentException - if this sequence is not part of
the associated SequenceAlignment
public void addSequence(GappedSequence seq,
int inset)
throws AlignmentVetoException
SequenceAlignment
addSequence in interface SequenceAlignmentseq - the sequence to be addedinset - the sequence inset
AlignmentVetoExceptionpublic int getLength()
SequenceAlignment
getLength in interface SequenceAlignmentpublic void removeSequenceFromGroup(Sequence sequence)
SequenceGroup
removeSequenceFromGroup in interface SequenceGroupsequence - the sequence
public GappedSequence removeSequence(int seqIndex)
throws AlignmentVetoException
SequenceAlignment
removeSequence in interface SequenceAlignmentseqIndex - the index of the sequence
AlignmentVetoException
public void setInset(int seqIndex,
int size)
throws AlignmentVetoException
SequenceAlignmentSpecial 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 SequenceAlignmentseqIndex - the index of the sequencesize - the size of the inset
AlignmentVetoExceptionpublic void clearSequences()
SequenceGroup
clearSequences in interface SequenceGrouppublic int getNumberSequences()
SequenceAlignment
getNumberSequences in interface SequenceAlignmentpublic boolean containsSequence(Sequence sequence)
SequenceGroup
containsSequence in interface SequenceGroupsequence - the sequence
public Iterator iterator()
SequenceGroup
iterator in interface SequenceGrouppublic GappedSequence getSequenceAt(int index)
SequenceAlignment
getSequenceAt in interface SequenceAlignmentindex - the index of the target sequence
public SequenceAlignment getSubAlignment(int startPos,
int endPos,
int startSeq,
int endSeq)
SequenceAlignment
getSubAlignment in interface SequenceAlignmentstartPos - 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 SequenceAlignmentpublic SequenceType getSequenceType()
SequenceAlignment
getSequenceType in interface SequenceAlignmentpublic int getInset(int index)
SequenceAlignment
getInset in interface SequenceAlignmentindex - the sequence index
public int getSequenceIndex(GappedSequence sequence)
SequenceAlignment
getSequenceIndex in interface SequenceAlignmentsequence - the query sequence
public void removeAlignmentListener(AlignmentListener listener)
AlignmentEventProvider
removeAlignmentListener in interface AlignmentEventProviderlistener - the listener to be removedpublic void addAlignmentListener(AlignmentListener listener)
AlignmentEventProvider
addAlignmentListener in interface AlignmentEventProviderlistener - a multiple sequence alignment listenerpublic void removeVetoableAlignmentListener(VetoableAlignmentListener listener)
AlignmentEventProvider
removeVetoableAlignmentListener in interface AlignmentEventProviderlistener - the listener to be removedpublic void addVetoableAlignmentListener(VetoableAlignmentListener listener)
AlignmentEventProvider
addVetoableAlignmentListener in interface AlignmentEventProviderlistener - a vetoable multiple sequence alignment listenerpublic void changeOccurred(SequenceEvent event)
SequenceListener
changeOccurred in interface SequenceListenerevent -
public void vetoableChangeOccurred(VetoableSequenceEvent event)
throws SequenceVetoException
VetoableSequenceListener
vetoableChangeOccurred in interface VetoableSequenceListenerevent - the event
SequenceVetoException - if the listener does not wish
the event to occur.public void changeOccurred(AlignmentEvent event)
AlignmentListener
changeOccurred in interface AlignmentListenerevent - the event type
public void vetoableChangeOccurred(VetoableAlignmentEvent event)
throws AlignmentVetoException
AlignmentVetoExceptionpublic void addSequenceListener(SequenceListener listener)
SequenceEventProvider
addSequenceListener in interface SequenceEventProviderlistener - the sequence listenerpublic void removeSequenceListener(SequenceListener listener)
SequenceEventProvider
removeSequenceListener in interface SequenceEventProviderlistener - the sequence listenerpublic void addVetoableSequenceListener(VetoableSequenceListener listener)
SequenceEventProvider
addVetoableSequenceListener in interface SequenceEventProviderlistener - the vetoable sequence listenerpublic void removeVetoableSequenceListener(VetoableSequenceListener listener)
SequenceEventProvider
removeVetoableSequenceListener in interface SequenceEventProviderlistener - 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 | |||||||||