@Immutable
public class VcfGenotype
extends java.lang.Object
For example:
Genotype.fromString("A").toString(); // prints A|A
Always use equals(Object) to compare genotypes, not toString().equals.| Constructor and Description |
|---|
VcfGenotype(VcfAllele allele1,
VcfAllele allele2,
boolean isPhased)
Note:
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
static VcfGenotype |
fromNumberString(VcfPosition position,
java.lang.String genotype) |
static VcfGenotype |
fromString(java.lang.String genotype) |
static VcfGenotype |
fromVcf(VcfPosition position,
VcfSample sample) |
VcfAllele |
getAllele1() |
VcfAllele |
getAllele2() |
java.util.Set<VcfAllele> |
getAlleleSet() |
int |
hashCode() |
boolean |
isHomozygous() |
boolean |
isNoCall() |
boolean |
isPhased() |
java.lang.String |
makeGt(VcfPosition position) |
java.lang.String |
toString() |
@Nonnull public static VcfGenotype fromString(@Nonnull java.lang.String genotype)
genotype - A string like A/TT@Nullable public static VcfGenotype fromVcf(@Nonnull VcfPosition position, @Nonnull VcfSample sample)
@Nullable public static VcfGenotype fromNumberString(@Nonnull VcfPosition position, @Nonnull java.lang.String genotype)
genotype - A string like 0/1@Nonnull
public java.lang.String makeGt(@Nonnull
VcfPosition position)
public boolean isPhased()
public boolean isHomozygous()
public boolean isNoCall()
@Nullable public VcfAllele getAllele1()
@Nullable public VcfAllele getAllele2()
@Nonnull public java.util.Set<VcfAllele> getAlleleSet()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object