public static class Edit.Substitute<C extends Compound> extends Edit.AbstractEdit<C>
Sub TT @ position 2
AAAA -> ATTA
We do not support
Edits do not require the length of the insertion but do rely on the
presence of a CompoundSet to parse a String (if given) which means
the eventual length of a Sequence is a lazy operation.Edit.AbstractEdit<C extends Compound>, Edit.Delete<C extends Compound>, Edit.Insert<C extends Compound>, Edit.Substitute<C extends Compound>| Constructor and Description |
|---|
Substitute(Sequence<C> sequence,
int position) |
Substitute(String sequence,
int position) |
| Modifier and Type | Method and Description |
|---|---|
int |
getEnd(Sequence<C> sequence)
Must use this rather than the no-args getEnd as this can return
-1 and the length of a sub is dependent on the length of the
Sequence; we cannot assume 1:1 mapping between characters in a
String and the number of compounds we will have to insert.
|
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.
|
edit, getEmptySequence, getEnd, getStart, getTargetSequence, setSequence, setStringSequencepublic Substitute(String sequence, int position)
public Substitute(Sequence<C> sequence, int position)
public int getEnd(Sequence<C> sequence)
protected Sequence<C> getFivePrime(Sequence<C> editingSequence)
Edit.AbstractEditgetFivePrime in class Edit.AbstractEdit<C extends Compound>protected Sequence<C> getThreePrime(Sequence<C> editingSequence)
Edit.AbstractEditgetThreePrime in class Edit.AbstractEdit<C extends Compound>Copyright © 2000–2017 BioJava. All rights reserved.