public final class Mutation extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
FROM_OFFSET |
static int |
LETTER_MASK |
static int |
MAX_POSITION_VALUE |
static int |
MUTATION_POSITION_MASK |
static int |
MUTATION_TYPE_MASK |
static int |
MUTATION_TYPE_OFFSET |
static int |
NON_MUTATION |
static int |
NON_MUTATION_1 |
static IntArrayList.IntComparator |
POSITION_COMPARATOR
Compares int mutations by their positions
|
static int |
POSITION_OFFSET |
static int |
RAW_MUTATION_TYPE_DELETION |
static int |
RAW_MUTATION_TYPE_INSERTION |
static int |
RAW_MUTATION_TYPE_RESERVED |
static int |
RAW_MUTATION_TYPE_SUBSTITUTION |
| Modifier and Type | Method and Description |
|---|---|
static int |
createDeletion(int position,
int from) |
static int |
createInsertion(int position,
int to) |
static int |
createMutation(int rawType,
int from,
int to) |
static int |
createMutation(int rawType,
int position,
int from,
int to) |
static int |
createMutation(MutationType type,
int from,
int to) |
static int |
createMutation(MutationType type,
int position,
int from,
int to) |
static int |
createSubstitution(int position,
int from,
int to) |
static String |
encode(int mutation,
Alphabet alphabet)
Encodes single mutation in compact human-readable string, that can be decoded by method
MutationsUtil.decode(String, com.milaboratory.core.sequence.Alphabet). |
static String |
encodeFixed(int mutation,
Alphabet alphabet) |
static byte |
getFrom(int code) |
static char |
getFromSymbol(int code,
Alphabet alphabet) |
static int |
getPosition(int code) |
static int |
getRawTypeCode(int code)
Returns: 0x20 for substitution, 0x40 for Deletion, 0x60 for insertion.
|
static byte |
getTo(int code) |
static char |
getToSymbol(int code,
Alphabet alphabet) |
static MutationType |
getType(int code) |
static boolean |
isDeletion(int code) |
static boolean |
isInDel(int code) |
static boolean |
isInsertion(int code) |
static boolean |
isSubstitution(int code) |
static int |
move(int mutation,
int offset) |
static String |
toString(Alphabet alphabet,
int mutation) |
public static final int RAW_MUTATION_TYPE_SUBSTITUTION
public static final int RAW_MUTATION_TYPE_DELETION
public static final int RAW_MUTATION_TYPE_INSERTION
public static final int RAW_MUTATION_TYPE_RESERVED
public static final int MUTATION_TYPE_MASK
public static final int MUTATION_POSITION_MASK
public static final int LETTER_MASK
public static final int FROM_OFFSET
public static final int POSITION_OFFSET
public static final int MAX_POSITION_VALUE
public static final int NON_MUTATION
public static final int NON_MUTATION_1
public static final int MUTATION_TYPE_OFFSET
public static IntArrayList.IntComparator POSITION_COMPARATOR
public static int createInsertion(int position,
int to)
public static int createDeletion(int position,
int from)
public static int createSubstitution(int position,
int from,
int to)
public static int createMutation(MutationType type, int from, int to)
public static int createMutation(int rawType,
int from,
int to)
public static int createMutation(MutationType type, int position, int from, int to)
public static int createMutation(int rawType,
int position,
int from,
int to)
public static int getPosition(int code)
public static byte getFrom(int code)
public static char getFromSymbol(int code,
Alphabet alphabet)
public static byte getTo(int code)
public static char getToSymbol(int code,
Alphabet alphabet)
public static int getRawTypeCode(int code)
code - mutation code form mutations array returned by Aligner.alignGlobal(AlignmentScoring,
com.milaboratory.core.sequence.Sequence, com.milaboratory.core.sequence.Sequence) method.public static MutationType getType(int code)
public static boolean isSubstitution(int code)
public static boolean isInsertion(int code)
public static boolean isDeletion(int code)
public static boolean isInDel(int code)
public static int move(int mutation,
int offset)
public static String encode(int mutation, Alphabet alphabet)
MutationsUtil.decode(String, com.milaboratory.core.sequence.Alphabet).
The format is following:
S then nucleotide in initial sequence encoded in one letter
(from) then position then resulting nucleotide (to) encoded in one letter. (Example: SA12T = substitution from A to T at position 12).D then nucleotide that was deleted encoded in one letter (from)
then position. (Example: DG43 = G deleted at position 43).I then position then inserted letter to. (Example:
I54C = C inserted before letter at position 54).mutation - mutation to encodeCopyright © 2018. All rights reserved.