org.biojava3.core.sequence.edits
Class Edit.Insert<C extends Compound>

java.lang.Object
  extended by org.biojava3.core.sequence.edits.Edit.AbstractEdit<C>
      extended by org.biojava3.core.sequence.edits.Edit.Insert<C>
All Implemented Interfaces:
Edit<C>
Enclosing interface:
Edit<C extends Compound>

public static class Edit.Insert<C extends Compound>
extends Edit.AbstractEdit<C>

Edit implementation which allows us to insert a base at any position in a Sequence. Specifying 1 base is used to insert at the start and end of a Sequence. If you wish to carry out an in-sequence insertion then you specify the flanking base positions e.g.

   ACTG insert TT @ position 1   : TTACGT
   ACTG insert TT @ position 2,3 : ACTTGT
   ACTG insert A  @ position 4   : ACGTA
 
The code will raise exceptions if you attempt a single base edit with an insertion.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.biojava3.core.sequence.edits.Edit
Edit.AbstractEdit<C extends Compound>, Edit.Delete<C extends Compound>, Edit.Insert<C extends Compound>, Edit.Substitute<C extends Compound>
 
Constructor Summary
Edit.Insert(Sequence<C> sequence, int position)
           
Edit.Insert(Sequence<C> sequence, int start, int stop)
           
Edit.Insert(String sequence, int position)
           
Edit.Insert(String sequence, int start, int stop)
           
 
Method Summary
protected  Sequence<C> getFivePrime(Sequence<C> editingSequence)
          Should return the 5-prime end of the given Sequence according to the edit.
protected  Sequence<C> getThreePrime(Sequence<C> editingSequence)
          Should return the 3-prime end of the given Sequence according to the edit.
 
Methods inherited from class org.biojava3.core.sequence.edits.Edit.AbstractEdit
edit, getEmptySequence, getEnd, getStart, getTargetSequence, setSequence, setStringSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Edit.Insert

public Edit.Insert(String sequence,
                   int position)

Edit.Insert

public Edit.Insert(Sequence<C> sequence,
                   int position)

Edit.Insert

public Edit.Insert(String sequence,
                   int start,
                   int stop)

Edit.Insert

public Edit.Insert(Sequence<C> sequence,
                   int start,
                   int stop)
Method Detail

getFivePrime

protected Sequence<C> getFivePrime(Sequence<C> editingSequence)
Description copied from class: Edit.AbstractEdit
Should return the 5-prime end of the given Sequence according to the edit. An empty Sequence is valid.

Specified by:
getFivePrime in class Edit.AbstractEdit<C extends Compound>

getThreePrime

protected Sequence<C> getThreePrime(Sequence<C> editingSequence)
Description copied from class: Edit.AbstractEdit
Should return the 3-prime end of the given Sequence according to the edit. An empty Sequence is valid.

Specified by:
getThreePrime in class Edit.AbstractEdit<C extends Compound>