edu.mssm.crover.webapps.dimlib.datamodel
Class ArcadiaAlignment

java.lang.Object
  |
  +--edu.mssm.crover.webapps.dimlib.datamodel.ArcadiaAlignment

public class ArcadiaAlignment
extends java.lang.Object

Stores the ArcadiaAlignedSequences which make up an alignment.

Author:
luce

Constructor Summary
ArcadiaAlignment(ArcadiaAlignedSequence[] seqs)
          Constructs a new alignment for a set of sequences and an origin.
 
Method Summary
 BiologicalSequence findGappedSequence(java.lang.String shortname)
          Finds a sequence by name.
 java.lang.String getAlnDesc()
           
 ArcadiaAlignedSequence[] getGappedSequences()
          Returns the sequences with gaps.
 java.lang.String getID()
           
 BiologicalOrigin getOrigin()
           
 java.lang.String[] getPositions()
          Returns the positions of this alignment.
 ArcadiaAlignedSequence[] getSequenceSet()
          Get the array of sequences that compose this alignment.
 java.lang.String getShortName()
           
 SubmitterInfo getSubmitter()
           
 int longer()
          Computes and returns the length of the longer sequence of this alignment.
 void removeSequence(ArcadiaAlignedSequence seq)
          Removes the specified sequence from the alignment.
 void setAlnDesc(java.lang.String desc)
           
 void setID(java.lang.String id)
           
 void setOrigin(Origin x)
           
 void setPositions(java.lang.String[] positions, ArcadiaAlignedSequence[] sequences)
          Sets the alignment from an array of positions.
 void setSequenceSet(ArcadiaAlignedSequence[] ss)
          Sets the array of sequences that compose this alignment.
 void setShortName(java.lang.String x)
           
 void setSubmitter(java.lang.String name, java.lang.String email)
           
 void setSubmitter(SubmitterInfo submitter)
           
 java.lang.String toString()
          Format the alignment as text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArcadiaAlignment

public ArcadiaAlignment(ArcadiaAlignedSequence[] seqs)
Constructs a new alignment for a set of sequences and an origin. The objects passed in are referenced by the new Alignment, not duplicated.

Method Detail

getSequenceSet

public ArcadiaAlignedSequence[] getSequenceSet()
Get the array of sequences that compose this alignment.


setSequenceSet

public void setSequenceSet(ArcadiaAlignedSequence[] ss)
Sets the array of sequences that compose this alignment.


setAlnDesc

public void setAlnDesc(java.lang.String desc)

getAlnDesc

public java.lang.String getAlnDesc()

setID

public void setID(java.lang.String id)

getID

public java.lang.String getID()

getShortName

public java.lang.String getShortName()

setShortName

public void setShortName(java.lang.String x)

getOrigin

public BiologicalOrigin getOrigin()

setOrigin

public void setOrigin(Origin x)

setSubmitter

public void setSubmitter(java.lang.String name,
                         java.lang.String email)

setSubmitter

public void setSubmitter(SubmitterInfo submitter)

getSubmitter

public SubmitterInfo getSubmitter()

removeSequence

public void removeSequence(ArcadiaAlignedSequence seq)
Removes the specified sequence from the alignment. The gap arrangement is not disturbed by this operation in the other gapped sequences.


longer

public int longer()
Computes and returns the length of the longer sequence of this alignment.


findGappedSequence

public BiologicalSequence findGappedSequence(java.lang.String shortname)
Finds a sequence by name. Returns the first sequence of this alignment which name matches shortname (the search start by the last sequence an proceeds up to the first).

Returns:
The sequence, when found, or null.

getPositions

public java.lang.String[] getPositions()
Returns the positions of this alignment. A position is the string that contains all the residues and gaps present at a certain position of the alignment. For instance, given the following alignment,
 12345
 AS-FG
 ERTYI
 
Position 1 is defined to be "AE", position 2 to be "SR", position 3 to be "-T", etc.


setPositions

public void setPositions(java.lang.String[] positions,
                         ArcadiaAlignedSequence[] sequences)
Sets the alignment from an array of positions. Sets the sequences of this alignment according to the positions given as an array of String. All the information contained in sequences, but the sequences of residues, are used to construct the new alignment (for cross-linking later use).

Parameters:
positions - The positions given as residue code Strings
sequences - Describes the origin, shortName, etc, of the positions inserted
See Also:
(definition of an alignment position).

getGappedSequences

public ArcadiaAlignedSequence[] getGappedSequences()
Returns the sequences with gaps. The sequences that make up the alignment are returned with their gaps.


toString

public java.lang.String toString()
Format the alignment as text. Presents the state of this alignment as text for inspection during the debug process.

Overrides:
toString in class java.lang.Object


Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.