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

## org.ensembl.datamodel
Interface SequenceEdit

public interface SequenceEdit

A sequence modification action.

Author:
  Craig Melsopp

Method Summary
`java.lang.String` | `applyEdit(java.lang.String sourceSequence)` Creates a new sequence that is the original with this sequence applied to to it.
`java.lang.String` | `getAlternativeSequence()` The replacement sequence used by this edit.
`java.lang.String` | `getCode()` Code for this sequence edit.
`java.lang.String` | `getDescription()` Description for this sequence edit.
`int` | `getEnd()` The end position of the region replaced by the alternative sequence.
`java.lang.String` | `getName()` Name of this sequence edit.
`int` | `getStart()` The start position of the region replaced by the alternative sequence.
`int` | `lengthDiff()` The difference in length caused by applying this edit to a sequence.

Method Detail

### getCode

    public java.lang.String getCode()

  Code for this sequence edit.

  Returns:
    Code for this sequence edit.

### getName

    public java.lang.String getName()

  Name of this sequence edit.

  Returns:
    name of this sequence edit.

### getDescription

    public java.lang.String getDescription()

  Description for this sequence edit.

  Returns:
    description for this sequence edit.

### getStart

    public int getStart()

  The start position of the region replaced by the alternative sequence. Coordinates are inclusive and one-based, which means that inserts are unusually represented by a start 1bp higher than the end. E.g. start = 1, end = 1 is a replacement of the first base but start = 1, end = 0 is an insert BEFORE the first base.

  Returns:
    The start position of the region replaced by the alternative sequence.

### getEnd

    public int getEnd()

  The end position of the region replaced by the alternative sequence. Coordinates are inclusive and one-based, which means that inserts are unusually represented by a start 1bp higher than the end. E.g. start = 1, end = 1 is a replacement of the first base but start = 1, end = 0 is an insert BEFORE the first base.

  Returns:
    The end position of the region replaced by the alternative sequence.

### getAlternativeSequence

    public java.lang.String getAlternativeSequence()

  The replacement sequence used by this edit. The sequence may either be a string of amino acids or nucleotides depending on the context in which this edit is used. In the case of a deletion the replacement sequence is an empty string.

  Returns:
    The replacement sequence used by this edit.

### applyEdit

    public java.lang.String applyEdit(java.lang.String sourceSequence)

  Creates a new sequence that is the original with this sequence applied to to it.

  Parameters:
    `sourceSequence` - source sequence.
  Returns:
    modified sequence.

### lengthDiff

    public int lengthDiff()

  The difference in length caused by applying this edit to a sequence.

  Returns:
    The difference in length caused by applying this edit to a sequence. This may be be negative (deletion), positive (insertion) or 0 (replacement). If either start or end are not defined 0 is returned.

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