public interface Allele extends java.lang.Comparable<Allele>, java.io.Serializable
Types of alleles:
Ref: a t C g a // C is the reference base : a t G g a // C base is a G in some individuals : a t - g a // C base is deleted w.r.t. the reference : a t CAg a // A base is inserted w.r.t. the reference sequence
In these cases, where are the alleles?
Suppose I see a the following in the population:
Ref: a t C g a // C is the reference base : a t G g a // C base is a G in some individuals : a t - g a // C base is deleted w.r.t. the reference
How do I represent this? There are three segregating alleles:
{ C , G , - }
and these are represented as:
{ tC, tG, t }
Now suppose I have this more complex example:
Ref: a t C g a // C is the reference base : a t - g a : a t - - a : a t CAg a
There are actually four segregating alleles:
{ Cg , -g, --, and CAg } over bases 2-4
represented as:
{ tCg, tg, t, tCAg }
Critically, it should be possible to apply an allele to a reference sequence to create the correct haplotype sequence:
Allele + reference => haplotype
For convenience, we are going to create Alleles where the GenomeLoc of the allele is stored outside of the Allele object itself. So there's an idea of an A/C polymorphism independent of it's surrounding context. Given list of alleles it's possible to determine the "type" of the variation
A / C @ loc => SNP - / A => INDEL
If you know where allele is the reference, you can determine whether the variant is an insertion or deletion.
Alelle also supports is concept of a NO_CALL allele. This Allele represents a haplotype that couldn't be determined. This is usually represented by a '.' allele.
Note that Alleles store all bases as bytes, in **UPPER CASE**. So 'atc' == 'ATC' from the perspective of an Allele.
Modifier and Type | Field and Description |
---|---|
static Allele |
ALT_A |
static Allele |
ALT_C |
static Allele |
ALT_G |
static Allele |
ALT_N |
static Allele |
ALT_T |
static char |
BREAKEND_EXTENDING_LEFT |
static char |
BREAKEND_EXTENDING_RIGHT |
static Allele |
NO_CALL |
static java.lang.String |
NO_CALL_STRING
A generic static NO_CALL allele for use
|
static Allele |
NON_REF_ALLELE |
static java.lang.String |
NON_REF_STRING |
static Allele |
REF_A |
static Allele |
REF_C |
static Allele |
REF_G |
static Allele |
REF_N |
static Allele |
REF_T |
static char |
SINGLE_BREAKEND_INDICATOR
Non ref allele representations
|
static Allele |
SPAN_DEL |
static java.lang.String |
SPAN_DEL_STRING
A generic static SPAN_DEL allele for use
|
static Allele |
SV_SIMPLE_CNV |
static Allele |
SV_SIMPLE_DEL |
static Allele |
SV_SIMPLE_DUP |
static Allele |
SV_SIMPLE_INS |
static Allele |
SV_SIMPLE_INV |
static char |
SYMBOLIC_ALLELE_END |
static char |
SYMBOLIC_ALLELE_START |
static Allele |
UNSPECIFIED_ALTERNATE_ALLELE |
static java.lang.String |
UNSPECIFIED_ALTERNATE_ALLELE_STRING |
Modifier and Type | Method and Description |
---|---|
static boolean |
acceptableAlleleBases(byte[] bases)
Deprecated.
|
static boolean |
acceptableAlleleBases(byte[] bases,
boolean isReferenceAllele)
Deprecated.
|
static boolean |
acceptableAlleleBases(java.lang.String bases)
Deprecated.
|
static boolean |
acceptableAlleleBases(java.lang.String bases,
boolean isReferenceAllele)
Deprecated.
|
boolean |
basesMatch(Allele test) |
boolean |
basesMatch(byte[] test) |
boolean |
basesMatch(java.lang.String test) |
static Allele |
create(Allele allele,
boolean ignoreRefState)
Creates a new allele based on the provided one.
|
static Allele |
create(byte base) |
static Allele |
create(byte[] bases)
Creates a non-Ref allele.
|
static Allele |
create(byte[] bases,
boolean isRef)
Create a new Allele that includes bases and if tagged as the reference allele if isRef == true.
|
static Allele |
create(byte base,
boolean isRef) |
static Allele |
create(java.lang.String bases)
Creates a non-Ref allele.
|
static Allele |
create(java.lang.String bases,
boolean isRef)
Returns an allele with the given bases and reference status.
|
boolean |
equals(Allele other,
boolean ignoreRefState) |
boolean |
equals(java.lang.Object other) |
static Allele |
extend(Allele left,
byte[] right) |
byte[] |
getBases() |
java.lang.String |
getBaseString() |
byte[] |
getDisplayBases() |
java.lang.String |
getDisplayString() |
int |
hashCode() |
boolean |
isBreakpoint() |
boolean |
isCalled() |
boolean |
isNoCall() |
boolean |
isNonRefAllele() |
boolean |
isNonReference() |
boolean |
isPrefixOf(Allele other) |
boolean |
isReference() |
boolean |
isSingleBreakend() |
boolean |
isSymbolic() |
int |
length() |
static boolean |
oneIsPrefixOfOther(Allele a1,
Allele a2) |
java.lang.String |
toString() |
static boolean |
wouldBeBreakpoint(byte[] bases)
Deprecated.
|
static boolean |
wouldBeNoCallAllele(byte[] bases)
Deprecated.
|
static boolean |
wouldBeNullAllele(byte[] bases)
Deprecated.
|
static boolean |
wouldBeSingleBreakend(byte[] bases)
Deprecated.
|
static boolean |
wouldBeStarAllele(byte[] bases)
Deprecated.
|
static boolean |
wouldBeSymbolicAllele(byte[] bases)
Deprecated.
|
static final java.lang.String NO_CALL_STRING
static final java.lang.String SPAN_DEL_STRING
static final char SINGLE_BREAKEND_INDICATOR
static final char BREAKEND_EXTENDING_RIGHT
static final char BREAKEND_EXTENDING_LEFT
static final char SYMBOLIC_ALLELE_START
static final char SYMBOLIC_ALLELE_END
static final java.lang.String NON_REF_STRING
static final java.lang.String UNSPECIFIED_ALTERNATE_ALLELE_STRING
static final Allele REF_A
static final Allele ALT_A
static final Allele REF_C
static final Allele ALT_C
static final Allele REF_G
static final Allele ALT_G
static final Allele REF_T
static final Allele ALT_T
static final Allele REF_N
static final Allele ALT_N
static final Allele SPAN_DEL
static final Allele NO_CALL
static final Allele NON_REF_ALLELE
static final Allele UNSPECIFIED_ALTERNATE_ALLELE
static final Allele SV_SIMPLE_DEL
static final Allele SV_SIMPLE_INS
static final Allele SV_SIMPLE_INV
static final Allele SV_SIMPLE_CNV
static final Allele SV_SIMPLE_DUP
static Allele create(byte[] bases, boolean isRef)
bases
- the DNA sequence of this variation, '-', '.', or '*'isRef
- should we make this a reference allele?java.lang.IllegalArgumentException
- if bases contains illegal characters or is otherwise malformatedstatic Allele create(byte base, boolean isRef)
static Allele create(byte base)
@Deprecated static boolean wouldBeNullAllele(byte[] bases)
bases
- bases representing an allele@Deprecated static boolean wouldBeStarAllele(byte[] bases)
bases
- bases representing an allele@Deprecated static boolean wouldBeNoCallAllele(byte[] bases)
bases
- bases representing an allele@Deprecated static boolean wouldBeSymbolicAllele(byte[] bases)
bases
- bases representing an allele@Deprecated static boolean wouldBeBreakpoint(byte[] bases)
bases
- bases representing an allele@Deprecated static boolean wouldBeSingleBreakend(byte[] bases)
bases
- bases representing an allele@Deprecated static boolean acceptableAlleleBases(java.lang.String bases)
bases
- bases representing a reference allele@Deprecated static boolean acceptableAlleleBases(java.lang.String bases, boolean isReferenceAllele)
bases
- bases representing an alleleisReferenceAllele
- is a reference allele@Deprecated static boolean acceptableAlleleBases(byte[] bases)
bases
- bases representing a reference allele@Deprecated static boolean acceptableAlleleBases(byte[] bases, boolean isReferenceAllele)
bases
- bases representing an alleleisReferenceAllele
- true if a reference allelestatic Allele create(java.lang.String bases, boolean isRef)
bases
- bases representing an alleleisRef
- is this the reference allele?static Allele create(java.lang.String bases)
bases
- bases representing an allelestatic Allele create(byte[] bases)
bases
- bases representing an allelestatic Allele create(Allele allele, boolean ignoreRefState)
allele
- the allele from which to copy the basesignoreRefState
- should we ignore the reference state of the input allele and use the default ref state?boolean isPrefixOf(Allele other)
boolean isNoCall()
boolean isCalled()
boolean isReference()
boolean isNonReference()
boolean isSymbolic()
boolean isBreakpoint()
boolean isSingleBreakend()
java.lang.String toString()
toString
in class java.lang.Object
byte[] getBases()
java.lang.String getBaseString()
java.lang.String getDisplayString()
byte[] getDisplayBases()
boolean equals(java.lang.Object other)
equals
in class java.lang.Object
int hashCode()
hashCode
in class java.lang.Object
boolean equals(Allele other, boolean ignoreRefState)
boolean basesMatch(byte[] test)
boolean basesMatch(java.lang.String test)
boolean basesMatch(Allele test)
int length()
boolean isNonRefAllele()