Package vcf
Interface XGT1
-
- All Known Implementing Classes:
XBasicGT1
public interface XGT1
Interface
XGT1
(Genotype Likelihoods) represents genotype likelihoods for one sample.Instances of
XGT1
are required to be immutable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
allele1(int marker)
Returns the first allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise.int
allele2(int marker)
Returns the second allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise.float
gl(int marker, int allele1, int allele2)
Returns the probability of the observed data for the specified marker if the specified pair of ordered alleles is the true ordered genotype.int
idIndex()
Returns the sample identifier index.boolean
isPhased(int marker)
Returnstrue
if the observed data for the specified marker includes a phased genotype, and returnsfalse
otherwise.boolean
isRefSample()
Returnstrue
if the observed data for each marker includes a phased genotype that has no missing alleles, and returnsfalse
otherwise.Marker
marker(int marker)
Returns the specified marker.Markers
markers()
Returns the list of markers.int
nMarkers()
Returns the number of markers.java.lang.String
toString()
Returns a string representation ofthis
.
-
-
-
Method Detail
-
isRefSample
boolean isRefSample()
Returnstrue
if the observed data for each marker includes a phased genotype that has no missing alleles, and returnsfalse
otherwise.- Returns:
true
if the observed data for each marker includes a phased genotype that has no missing alleles, andfalse
otherwise
-
gl
float gl(int marker, int allele1, int allele2)
Returns the probability of the observed data for the specified marker if the specified pair of ordered alleles is the true ordered genotype.- Parameters:
marker
- the marker indexallele1
- the first allele indexallele2
- the second allele index- Returns:
- the probability of the observed data for the specified marker and sample if the specified pair of ordered alleles is the true ordered genotype
- Throws:
java.lang.IndexOutOfBoundsException
- ifmarker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- ifallele1 < 0 || allele1 >= this.marker(marker).nAlleles()
java.lang.IndexOutOfBoundsException
- ifallele2 < 0 || allele2 >= this.marker(marker).nAlleles()
-
isPhased
boolean isPhased(int marker)
Returnstrue
if the observed data for the specified marker includes a phased genotype, and returnsfalse
otherwise.- Parameters:
marker
- the marker index- Returns:
true
if the observed data for the specified marker includes a phased genotype, andfalse
otherwise- Throws:
java.lang.IndexOutOfBoundsException
- ifmarker < 0 || marker >= this.nMarkers()
-
allele1
int allele1(int marker)
Returns the first allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise. Alleles are arbitrarily ordered if the genotype is unphased.- Parameters:
marker
- the marker index- Returns:
- the first allele for the specified marker if the observed data include a non-missing allele, and -1 otherwise
- Throws:
java.lang.IndexOutOfBoundsException
- ifmarker < 0 || marker >= this.nMarkers()
-
allele2
int allele2(int marker)
Returns the second allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise. Alleles are arbitrarily ordered if the genotype is unphased.- Parameters:
marker
- the marker index- Returns:
- the second allele for the specified marker if the observed data include a non-missing allele, and -1 otherwise
- Throws:
java.lang.IndexOutOfBoundsException
- ifmarker < 0 || marker >= this.nMarkers()
-
nMarkers
int nMarkers()
Returns the number of markers.- Returns:
- the number of markers
-
marker
Marker marker(int marker)
Returns the specified marker.- Parameters:
marker
- the marker index- Returns:
- the specified marker
- Throws:
java.lang.IndexOutOfBoundsException
- ifmarker < 0 || marker >= this.nMarkers()
-
markers
Markers markers()
Returns the list of markers.- Returns:
- the list of markers
-
idIndex
int idIndex()
Returns the sample identifier index.- Returns:
- the sample identifier index
-
toString
java.lang.String toString()
Returns a string representation ofthis
. The exact details of the representation are unspecified and subject to change.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string representation of
this
-
-