public class HaplotypeProbabilitiesFromContaminatorSequence extends HaplotypeProbabilitiesFromSequence
HaplotypeProbabilities.Genotype
Modifier and Type | Field and Description |
---|---|
double |
contamination |
obsAllele1, obsAllele2, obsAlleleOther
Constructor and Description |
---|
HaplotypeProbabilitiesFromContaminatorSequence(HaplotypeBlock haplotypeBlock,
double contamination) |
Modifier and Type | Method and Description |
---|---|
void |
addToProbs(Snp snp,
byte base,
byte qual)
Adds a base observation with the observed quality to the evidence for this haplotype
based on the fact that the SNP is part of the haplotype.
|
double[] |
getLikelihoods()
Converts the loglikelihoods into linear-space.
|
double |
getLodMostProbableGenotype()
Overridden to calculate the LOD from the loglikelihoods instead of the probabilities
because it will allow for more accurate calculation before overflowing.
|
double[] |
getLogLikelihoods()
Since this class uses loglikelihoods natively, we override and return the native variable
|
double[] |
getPosteriorProbabilities()
Returns the posterior probability of the haplotypes given the evidence (uses the internal prior)
|
Snp |
getRepresentativeSnp()
Simple returns the SNP from the haplotype that has the lowest genome coordinate.
|
void |
merge(HaplotypeProbabilities other)
Merges information from another haplotype probabilities object for the same haplotype into
this object.
|
void |
setLogLikelihoods(double[] ll) |
getFractionUnexpectedAlleleObs, getObsAllele1, getObsAllele2, getTotalObs, hasEvidence
getHaplotype, getMostLikelyGenotype, getMostLikelyHaplotype, getPriorProbablities, scaledEvidenceProbabilityUsingGenotypeFrequencies, shiftedLogEvidenceProbability, shiftedLogEvidenceProbabilityGivenOtherEvidence, shiftedLogEvidenceProbabilityUsingGenotypeFrequencies
public HaplotypeProbabilitiesFromContaminatorSequence(HaplotypeBlock haplotypeBlock, double contamination)
public void addToProbs(Snp snp, byte base, byte qual)
addToProbs
in class HaplotypeProbabilitiesFromSequence
snp
- The snp in the HaplotypeBlock to which evidence is being addedbase
- the base observedqual
- the quality of the observed basepublic void merge(HaplotypeProbabilities other)
HaplotypeProbabilitiesFromSequence
merge
in class HaplotypeProbabilitiesFromSequence
other
- Another haplotype probabilities object to merge inpublic double[] getLogLikelihoods()
public Snp getRepresentativeSnp()
getRepresentativeSnp
in class HaplotypeProbabilities
public double[] getPosteriorProbabilities()
getPosteriorProbabilities
in class HaplotypeProbabilities
public double[] getLikelihoods()
getLikelihoods
in class HaplotypeProbabilities
public void setLogLikelihoods(double[] ll)
public double getLodMostProbableGenotype()
getLodMostProbableGenotype
in class HaplotypeProbabilities