Package org.pharmgkb.parser.vcf.model
Class AltStructuralVariant
java.lang.Object
org.pharmgkb.parser.vcf.model.AltStructuralVariant
A strictly validated VCF metadata ALT code of the form:
##ALT=<ID=type,Description=description>
Where ID is a colon-delimited list of identifiers. Some of these identifiers are reserved, as coded in the
ReservedStructuralVariantCode class. The first identifier (at level 0) is required to be reserved.
As explicitly stated in the spec, these codes are case-sensitive.
Example:
AltStructuralVariant alt = new AltStructuralVariant("INS:ME:LINE");
alt.getReservedComponent(0); // ReservedStructuralVariantCode.Insertion
alt.getReservedComponent(1); // ReservedStructuralVariantCode.MobileElement
alt.getReservedComponent(2); // null, because it's not a reserved code
alt.getComponent(); // "LINE"
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetComponent(int level) getReservedComponent(int level) toString()
-
Constructor Details
-
AltStructuralVariant
- Parameters:
string- The full code (e.g. INS:ME:LINE:type-a1)
-
-
Method Details
-
getComponents
- Returns:
- The list of codes in order from level 0 to level n; for example ("INS", "ME", "LINE")
-
getComponent
- Returns:
- The code at the specified level (e.g. CNV)
- Throws:
ArrayIndexOutOfBoundsException
-
getReservedComponent
- Returns:
- The code at the specified level (e.g. CNV), or null if it is not a reserved code
- Throws:
ArrayIndexOutOfBoundsException
-
toString
-