Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.algorithms.alignment
Class StringAlignment

    java.lang.Object
      de.jstacs.algorithms.alignment.StringAlignment

Direct Known Subclasses:
  PairwiseStringAlignment

    public class StringAlignment

extends Object

Class for the representation of an alignment of `String`s. It contains the `String`s that were aligned and expanded by gap-symbols, and the edit-costs according to the employed `Costs` instance.

Author:
  Jan Grau, Jens Keilwagen

Constructor Summary
`StringAlignment(double cost, String... strings)` This constructor creates an instance storing the aligned Strings and the costs of the alignment.

Method Summary
`String` | `getAlignedString(int index)` Returns the aligned `String` with index `index`.
`double` | `getCost()` Returns the costs.
`int` | `getLength()` This method return the length of the alignment.
`int` | `getNumberOfAlignedSequences()` Returns the number of sequences in this alignment.
`String` | `toString()`
`String` | `toString(int chunkSize, int simplifyIdx, List<String> annot)` This method returns a String representation of the alignment with a given chunk size.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### StringAlignment

    public StringAlignment(double cost,
                           String... strings)

  This constructor creates an instance storing the aligned Strings and the costs of the alignment.

  Parameters:
    `cost` - the cost of the alignment
    `strings` - the aligned and expanded Strings

Method Detail

### getCost

    public double getCost()

  Returns the costs.

  Returns:
    the costs

### getNumberOfAlignedSequences

    public int getNumberOfAlignedSequences()

  Returns the number of sequences in this alignment.

  Returns:
    the number of sequences in this alignment.

### getAlignedString

    public String getAlignedString(int index)

  Returns the aligned `String` with index `index`.

  Parameters:
    `index` - the index of the `String`
  Returns:
    the aligned `String` with index `index`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### toString

    public String toString(int chunkSize,
                           int simplifyIdx,
                           List<String> annot)

  This method returns a String representation of the alignment with a given chunk size. I.e. all aligned sequence will be split each `chunkSize` symbols.

  Parameters:
    `chunkSize` - the size of the chunks
    `simplifyIdx` - if non-negative the alignment is given relative to the sequence with the corresponding index; i.e. match is represented by "." and mismatch by the corresponding symbol
    `annot` - a list of annotations for the aligned Strings, can be `null`
  Returns:
    a String representation of the alignment

### getLength

    public int getLength()

  This method return the length of the alignment.

  Returns:
    the length of the alignment

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD