public class HaplotypeProbabilitiesFromSequence extends HaplotypeProbabilities
HaplotypeProbabilities.Genotype
Modifier and Type | Field and Description |
---|---|
protected int |
obsAllele1 |
protected int |
obsAllele2 |
protected int |
obsAlleleOther |
Constructor and Description |
---|
HaplotypeProbabilitiesFromSequence(HaplotypeBlock haplotypeBlock) |
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 |
getFractionUnexpectedAlleleObs() |
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
|
int |
getObsAllele1()
Returns the number of bases/reads that support the first allele.
|
int |
getObsAllele2()
Returns the number of bases/reads that support the second allele.
|
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.
|
int |
getTotalObs()
Gets the total number of observations presented at this locus.
|
boolean |
hasEvidence()
Returns true if evidence has been added, false if the probabilities are just the priors.
|
void |
merge(HaplotypeProbabilities other)
Merges information from another haplotype probabilities object for the same haplotype into
this object.
|
void |
setLogLikelihoods(double[] ll) |
getHaplotype, getMostLikelyGenotype, getMostLikelyHaplotype, getPriorProbablities, scaledEvidenceProbabilityUsingGenotypeFrequencies, shiftedLogEvidenceProbability, shiftedLogEvidenceProbabilityGivenOtherEvidence, shiftedLogEvidenceProbabilityUsingGenotypeFrequencies
protected int obsAllele1
protected int obsAllele2
protected int obsAlleleOther
public HaplotypeProbabilitiesFromSequence(HaplotypeBlock haplotypeBlock)
public boolean hasEvidence()
HaplotypeProbabilities
public void addToProbs(Snp snp, byte base, byte qual)
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)
other
- Another haplotype probabilities object to merge inpublic int getObsAllele1()
getObsAllele1
in class HaplotypeProbabilities
public int getObsAllele2()
getObsAllele2
in class HaplotypeProbabilities
public int getTotalObs()
getTotalObs
in class HaplotypeProbabilities
public double getFractionUnexpectedAlleleObs()
public Snp getRepresentativeSnp()
getRepresentativeSnp
in class HaplotypeProbabilities
public double[] getPosteriorProbabilities()
getPosteriorProbabilities
in class HaplotypeProbabilities
public double[] getLikelihoods()
getLikelihoods
in class HaplotypeProbabilities
public double[] getLogLikelihoods()
getLogLikelihoods
in class HaplotypeProbabilities
public void setLogLikelihoods(double[] ll)
public double getLodMostProbableGenotype()
getLodMostProbableGenotype
in class HaplotypeProbabilities