Class VcfAllele
java.lang.Object
org.pharmgkb.parser.vcf.model.genotype.VcfAllele
An Allele matching the VCF 4.2 specification for the ALT and REF columns.
For example:
- ATgggcN
- <IDxx>
- ]34]ATGC
- ]34:55]<IDxx>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsBase(char... bases) booleanbooleanequalsIgnoreCase(VcfAllele allele) inthashCode()booleanbooleanbooleanbooleanisSimple()booleanintlength()Before calling, verify that this VcfAllele is not a breakpoint or a symbolic name.toString()
-
Constructor Details
-
VcfAllele
- Parameters:
string- A string following the VCF specification for the REF or ALT columns
-
-
Method Details
-
toString
-
length
Before calling, verify that this VcfAllele is not a breakpoint or a symbolic name.- Returns:
- The number of bases in this Allele
- Throws:
VcfFormatException- If this Allele is a breakpoint or symbolic nameIllegalArgumentException
-
isBreakpoint
public boolean isBreakpoint()- Returns:
- Whether this Allele is defined using breakpoints (see the VCF spec)
-
isSymbolic
public boolean isSymbolic()- Returns:
- Whether this Allele contains a symbolic name like <IDxx>
-
isAmbigious
public boolean isAmbigious()- Returns:
- Whether this Allele contains 'N' or 'n' as a base (does not include symbolic names)
-
isDeleted
public boolean isDeleted()- Returns:
- Whether this Allele is '*', indicating a deletion upstream
-
isSimple
public boolean isSimple()- Returns:
- Whether this Allele is not symbolic, deleted, or a breakpoint
-
getPrimaryType
-
withLowercaseBases
- Returns:
- A string where every base is in lowercase; symbolic names (e.g. <IDxx>) will not be lowercased
-
equalsIgnoreCase
-
equals
-
hashCode
public int hashCode() -
containsBase
public boolean containsBase(@Nonnull char... bases) - Returns:
- Whether this Allele contains one or more of the characters (case-sensitive) in
bases, restricted to bases (i.e. symbolic names like <IDxx> are excluded)
-