uk.ac.man.bioinf.sequence.complex
Interface ComplexSequence

All Superinterfaces:
Identifiable, Sequence
All Known Subinterfaces:
ComplexEditableGappedSequence, GappedComplexSequence
All Known Implementing Classes:
AbstractComplexSequence, DefaultGappedComplexSequence

public interface ComplexSequence
extends Sequence

ComplexSequence.java Created: Wed Nov 22 17:56:08 2000

Version:
$Id: ComplexSequence.java,v 1.2 2001/04/11 17:04:43 lord Exp $
Author:
Phillip Lord

Method Summary
 ComplexElement addModificationAt(Modification mod, int index)
           
 ComplexElement getComplexElementAt(int index)
           
 char[] getComplexElementAtAsChar(int index)
          Representing a ComplexElement as a char is not a simple task.
 char[] getComplexSequenceAsChars()
           
 ComplexElement removeModificationAt(Modification mod, int index)
           
 
Methods inherited from interface uk.ac.man.bioinf.sequence.Sequence
getElementAt, getElementAtAsChar, getLength, getSequenceAsChars, getSequenceAsElements, getSequenceType, getSubSequence
 
Methods inherited from interface uk.ac.man.bioinf.sequence.identifier.Identifiable
getIdentifier
 

Method Detail

addModificationAt

public ComplexElement addModificationAt(Modification mod,
                                        int index)
                                 throws NoSuchSequenceElementException,
                                        SequenceVetoException
NoSuchSequenceElementException
SequenceVetoException

removeModificationAt

public ComplexElement removeModificationAt(Modification mod,
                                           int index)
                                    throws NoSuchSequenceElementException,
                                           SequenceVetoException,
                                           NoSuchModificationException
NoSuchSequenceElementException
SequenceVetoException
NoSuchModificationException

getComplexElementAt

public ComplexElement getComplexElementAt(int index)

getComplexElementAtAsChar

public char[] getComplexElementAtAsChar(int index)
Representing a ComplexElement as a char is not a simple task. An Element can have any number of Modifications each of which comes with its own char representation. The following approach is used. Each Element is represented first by its own char representation, and then by its all of its modifications, and then finally by an underscore _, which acts as a standard terminator. Counting the number of underscores should show how many Elements there are. This is not meant to be a particular wonderfully parse-able format.

Parameters:
index -
Returns:
a char[] value

getComplexSequenceAsChars

public char[] getComplexSequenceAsChars()