public class IbdBaum
extends java.lang.Object
Class IbdBaum estimates LOD scores for an IBD versus a non-IBD
model, and it estimates LOD scores for an HBD versus a non-HBD model.
Instances of class IbdBaum are immutable.
| Constructor and Description |
|---|
IbdBaum(Dag dag,
GL gl)
Creates a new
IbdBaum instance from the specified data. |
| Modifier and Type | Method and Description |
|---|---|
Dag |
dag()
Returns the directed acyclic graph that determines the transition
probabilities.
|
static double |
freqLod(int hap,
int start,
int end,
HapPairs hapPairs,
Dag dag)
Returns the estimated frequency of the haplotype segment on the LOD
(-Math.log10) scale. |
GL |
gl()
Returns the HMM emission probabilities.
|
double |
hbdLod(int sample,
int start,
int end)
Returns the homozygosity-by-descent (HBD) LOD score.
|
double |
ibdLod(int sampleA,
int sampleB,
int start,
int end)
Returns the identity-by-descent (IBD) LOD score.
|
public IbdBaum(Dag dag, GL gl)
IbdBaum instance from the specified data.dag - the directed acyclic graph that determines the
transition probabilitiesgl - the HMM emission probabilitiesjava.lang.IllegalArgumentException - if dag.markers().equals(gl.markers()) == falsejava.lang.NullPointerException - if dag == null || gl == nullpublic Dag dag()
public GL gl()
public double hbdLod(int sample,
int start,
int end)
sample - the sample indexstart - the start marker index (inclusive)end - the end marker index (exclusive)java.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.gl().nSamples()java.lang.IndexOutOfBoundsException - if
start < 0 || start > end || end > this.dag.nMarkers()public double ibdLod(int sampleA,
int sampleB,
int start,
int end)
sampleA - the first sample indexsampleB - the second sample indexstart - the start marker index (inclusive)end - the end marker index (exclusive)java.lang.IndexOutOfBoundsException - if
sampleA < 0 || sampleA >= this.gl().nSamples()java.lang.IndexOutOfBoundsException - if
sampleB < 0 || sampleB >= this.gl().nSamples()java.lang.IndexOutOfBoundsException - if
start < 0 || start > end || end > this.dag.nMarkers()public static double freqLod(int hap,
int start,
int end,
HapPairs hapPairs,
Dag dag)
(-Math.log10) scale.hap - a haplotype indexstart - the start marker index (inclusive)end - the end marker index (exclusive)hapPairs - the list of haplotype pairsdag - the directed acyclic graph that determines the HMM
transition probabilities(-Math.log10) scalejava.lang.IndexOutOfBoundsException - if
hap < 0 || hap >= haps.nHaps()java.lang.IndexOutOfBoundsException - if
start < 0 || start > end || end > dag.nMarkers()java.lang.NullPointerException - if dag == null || haps == null