public class SampleHapPairAlleleProbs extends java.lang.Object implements AlleleProbs
Class SampleHapPairAlleleProbs is a wrapper for a
SampleHapPairs instance.
Instances of class HaplotypeAlleleProbs are immutable.
| Constructor and Description |
|---|
SampleHapPairAlleleProbs(SampleHapPairs sampleHapPairs)
Constructs a new
SampleHapPairAlleleProbs instance that wraps
the specified SampleHapPairs object. |
| 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.
|
public SampleHapPairAlleleProbs(SampleHapPairs sampleHapPairs)
SampleHapPairAlleleProbs instance that wraps
the specified SampleHapPairs object. The alleles in
the specified SampleHapPairs instance will have
probability 1.sampleHapPairs - the sample haplotype pairs that will
be wrapped by thisjava.lang.NullPointerException - if sampleHapPairs == nullpublic float alProb1(int marker,
int sample,
int allele)
AlleleProbsalProb1 in interface AlleleProbsmarker - a marker indexsample - a sample indexallele - an allele indexpublic float alProb2(int marker,
int sample,
int allele)
AlleleProbsalProb2 in interface AlleleProbsmarker - a marker indexsample - a sample indexallele - an allele indexpublic float gtProb(int marker,
int sample,
int allele1,
int allele2)
AlleleProbs(this.allele1(marker, sample, allele1)
* this.allele2(marker, sample, allele2)).gtProb in interface AlleleProbsmarker - 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))public int allele1(int marker,
int sample)
AlleleProbsallele1 in interface AlleleProbsmarker - a marker indexsample - a sample indexpublic int allele2(int marker,
int sample)
AlleleProbsallele2 in interface AlleleProbsmarker - a marker indexsample - a sample indexpublic Marker marker(int marker)
AlleleProbsmarker in interface AlleleProbsmarker - a marker indexpublic Markers markers()
AlleleProbsmarkers in interface AlleleProbspublic int nMarkers()
AlleleProbsnMarkers in interface AlleleProbspublic int nSamples()
AlleleProbsnSamples in interface AlleleProbspublic Samples samples()
AlleleProbssamples in interface AlleleProbs