public interface AlleleProbs
Interface AlleleProbs
represents per-haplotype allele
probabilities for a list of samples.
All instances of AlleleProbs
are required to be immutable.
Modifier and Type | Method and Description |
---|---|
int |
allele1(int marker,
int sample)
Returns the marker allele with maximum probability for the
first haplotype of the specified sample.
|
int |
allele2(int marker,
int sample)
Returns the marker allele with maximum probability for the
second haplotype of the specified sample.
|
float |
alProb1(int marker,
int sample,
int allele)
Returns the probability that the specified marker allele is
present on the first haplotype of the specified sample.
|
float |
alProb2(int marker,
int sample,
int allele)
Returns the probability that the specified marker allele is
present on the second haplotype of the specified sample.
|
float |
gtProb(int marker,
int sample,
int allele1,
int allele2)
Returns the phased genotype probability, equal to
(this.allele1(marker, sample, allele1)
* this.allele2(marker, sample, allele2)) . |
Marker |
marker(int marker)
Returns the specified marker.
|
Markers |
markers()
Returns the list of markers.
|
int |
nMarkers()
Returns the number of markers.
|
int |
nSamples()
Returns the number of samples.
|
Samples |
samples()
Returns the list of samples.
|
float alProb1(int marker, int sample, int allele)
marker
- a marker indexsample
- a sample indexallele
- an allele indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
java.lang.IndexOutOfBoundsException
- if
allele < 0 || allele >= this.marker(marker).nAlleles()
float alProb2(int marker, int sample, int allele)
marker
- a marker indexsample
- a sample indexallele
- an allele indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
java.lang.IndexOutOfBoundsException
- if
allele < 0 || allele >= this.marker(marker).nAlleles()
float gtProb(int marker, int sample, int allele1, int allele2)
(this.allele1(marker, sample, allele1)
* this.allele2(marker, sample, allele2))
.marker
- a marker indexsample
- a sample indexallele1
- allele index of the allele on the first haplotypeallele2
- allele index of the allele on the second haplotype(this.allele1(marker, sample, allele1)
* this.allele2(marker, sample, allele2))
java.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
java.lang.IndexOutOfBoundsException
- if
allele1 < 0 || allele1 >= this.marker(marker).nAlleles()
java.lang.IndexOutOfBoundsException
- if
allele2 < 0 || allele2 >= this.marker(marker).nAlleles()
int allele1(int marker, int sample)
marker
- a marker indexsample
- a sample indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
int allele2(int marker, int sample)
marker
- a marker indexsample
- a sample indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
java.lang.IndexOutOfBoundsException
- if
sample < 0 || sample >= this.nSamples()
Marker marker(int marker)
marker
- a marker indexjava.lang.IndexOutOfBoundsException
- if
marker < 0 || marker >= this.nMarkers()
Markers markers()
int nMarkers()
int nSamples()
Samples samples()