public class FuzzyGL extends java.lang.Object implements GL
Class FuzzyGL
is a wrapper for a GL
instance that incorporates a fixed error rate for the
observed (emitted) allele to differ from the true allele. Allele
errors are independent.
FuzzyGL
are immutable.Constructor and Description |
---|
FuzzyGL(GL gl,
float err)
Constructs a
FuzzyGL instance. |
Modifier and Type | Method and Description |
---|---|
int |
allele(int marker,
int hap)
Returns the allele on the specified haplotype for the specified marker
if the observed data include a non-missing allele, and returns
-1 otherwise.
|
int |
allele1(int marker,
int sample)
Returns the first allele for the specified marker and sample
if the observed data include a non-missing allele, and returns -1
otherwise.
|
int |
allele2(int marker,
int sample)
Returns the second allele for the specified marker and sample
if the observed data include a non-missing allele, and
returns -1 otherwise.
|
float |
gl(int marker,
int sample,
int a1,
int a2)
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.
|
boolean |
isPhased(int marker,
int sample)
Returns
true if the observed data for the specified
marker and sample includes a phased genotype, and returns false
otherwise. |
boolean |
isRefData()
Returns
true if the observed data for each marker and sample
includes a phased genotype that has no missing alleles,
and returns false otherwise. |
Marker |
marker(int marker)
Returns the specified marker.
|
Markers |
markers()
Returns the list of markers.
|
int |
nHaps()
Returns the number of haplotypes.
|
int |
nMarkers()
Returns the number of markers.
|
int |
nSamples()
Returns the number of samples.
|
Samples |
samples()
Returns the list of samples.
|
public FuzzyGL(GL gl, float err)
FuzzyGL
instance.gl
- the genotype likelihoods without errorerr
- the allele error ratejava.lang.IllegalArgumentException
- if
Float.isNaN(err) || err < 0 || err >= 1.0
java.lang.NullPointerException
- if gl == null
public float gl(int marker, int sample, int a1, int a2)
GL
gl
in interface GL
marker
- the marker indexsample
- the sample indexa1
- the first allele indexa2
- the second allele indexpublic boolean isRefData()
GL
true
if the observed data for each marker and sample
includes a phased genotype that has no missing alleles,
and returns false
otherwise.public boolean isPhased(int marker, int sample)
GL
true
if the observed data for the specified
marker and sample includes a phased genotype, and returns false
otherwise.public int allele1(int marker, int sample)
GL
public int allele2(int marker, int sample)
GL
public int allele(int marker, int hap)
GL
public int nMarkers()
GL
public Marker marker(int marker)
GL
public int nHaps()
GL
public int nSamples()
GL