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.data
Class Sequence.CompositeSequence<T>

    java.lang.Object
      de.jstacs.data.Sequence<T>
          de.jstacs.data.Sequence.RecursiveSequence<T>
              de.jstacs.data.Sequence.CompositeSequence<T>

Type Parameters:
  `T` - the type of each position

All Implemented Interfaces:
  Comparable<Sequence<T>>

Enclosing class:
  Sequence<T>

    protected static class Sequence.CompositeSequence<T>

extends Sequence.RecursiveSequence<T>

The class handles composite `Sequence`s. A `Sequence.CompositeSequence` consists of several (partial) `Sequence` s. A biological example are promoters like in eukaryotes (-10 and -35 box).

Author:
  Jens Keilwagen

Nested Class Summary

Nested classes/interfaces inherited from class de.jstacs.data.Sequence
`Sequence.CompositeSequence<T>, Sequence.RecursiveSequence<T>, Sequence.SubSequence<T>`

Field Summary

Fields inherited from class de.jstacs.data.Sequence.RecursiveSequence
`content`

Fields inherited from class de.jstacs.data.Sequence
`alphabetCon, annotation, rc`

Constructor Summary
`Sequence.CompositeSequence(AlphabetContainer abc, Sequence<T> seq, int[] starts, int[] lengths)` This constructor should be used if one wants to create a `Sample` of `Sequence.CompositeSequence`s.
`Sequence.CompositeSequence(Sequence seq, int[] starts, int[] lengths)` This is a very efficient way to create a `Sequence.CompositeSequence` for `Sequence`s with a simple `AlphabetContainer`.

Method Summary
`protected Sequence` | `flatCloneWithoutAnnotation()` Works in analogy to `Object.clone()`, but does not clone the annotation.
`protected int` | `getIndex(int pos)` Returns the index in the internal sequence.
`int` | `getLength()` Returns the length of the `Sequence`.

Methods inherited from class de.jstacs.data.Sequence.RecursiveSequence
`addToRepresentation, compareTo, continuousVal, discreteVal, fillContainer, getEmptyContainer, getEmptyRepresentation, getStringRepresentation, hashCodeForPos, isMultiDimensional`

Methods inherited from class de.jstacs.data.Sequence
`annotate, compareTo, complement, complement, create, create, create, equals, getAlphabetContainer, getAnnotation, getCompositeSequence, getCompositeSequence, getHammingDistance, getNumberOfSequenceAnnotationsByType, getSequenceAnnotationByType, getSequenceAnnotationByTypeAndIdentifier, getSubSequence, getSubSequence, getSubSequence, getSubSequence, hashCode, matches, reverse, reverse, reverseComplement, reverseComplement, toDiscrete, toString, toString, toString, toString`

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

Constructor Detail

### Sequence.CompositeSequence

    public Sequence.CompositeSequence(Sequence seq,
                                      int[] starts,
                                      int[] lengths)

  This is a very efficient way to create a `Sequence.CompositeSequence` for `Sequence`s with a simple `AlphabetContainer`.

  Parameters:
    `seq` - the original `Sequence`
    `starts` - the start positions of the junks
    `lengths` - the length of each junk

### Sequence.CompositeSequence

    public Sequence.CompositeSequence(AlphabetContainer abc,
                                      Sequence<T> seq,
                                      int[] starts,
                                      int[] lengths)

  This constructor should be used if one wants to create a `Sample` of `Sequence.CompositeSequence`s. With this constructor you are enabled to create a `Sample` where every `Sequence` has the same `AlphabetContainer` instance.
  Internally it is checked that the `AlphabetContainer` matches with the one of the subsequence.

  Parameters:
    `abc` - the new `AlphabetContainer`
    `seq` - the original `Sequence`
    `starts` - the start positions of the junks
    `lengths` - the length of each junk

Method Detail

### getIndex

    protected int getIndex(int pos)

  Description copied from class: `Sequence.RecursiveSequence`
  Returns the index in the internal sequence.

  Specified by:
    `getIndex` in class `Sequence.RecursiveSequence<T>`
  Parameters:
    `pos` - the index in the external sequence
  Returns:
    the index in the internal sequence

### getLength

    public int getLength()

  Description copied from class: `Sequence`
  Returns the length of the `Sequence`.

  Specified by:
    `getLength` in class `Sequence<T>`
  Returns:
    the length of the `Sequence`

### flatCloneWithoutAnnotation

    protected Sequence flatCloneWithoutAnnotation()

  Description copied from class: `Sequence`
  Works in analogy to `Object.clone()`, but does not clone the annotation. This method is used in `Sequence.annotate(boolean, SequenceAnnotation...)`.

  Specified by:
    `flatCloneWithoutAnnotation` in class `Sequence<T>`
  Returns:
    the cloned `Sequence` without annotation

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