Package picard.fingerprint
Class CappedHaplotypeProbabilities
- java.lang.Object
-
- picard.fingerprint.HaplotypeProbabilities
-
- picard.fingerprint.CappedHaplotypeProbabilities
-
public class CappedHaplotypeProbabilities extends HaplotypeProbabilities
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class picard.fingerprint.HaplotypeProbabilities
HaplotypeProbabilities.Genotype
-
-
Constructor Summary
Constructors Constructor Description CappedHaplotypeProbabilities(HaplotypeProbabilities haplotypeProbabilities, double cap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HaplotypeProbabilitiesdeepCopy()double[]getLikelihoods()Converts the loglikelihoods into linear-space with normalizing.double[]getLikelihoods0()doublegetLodMostProbableGenotype()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 log-rawLikelihoods natively, we override and return the native variabledouble[]getPosteriorProbabilities()getter for posteriorProbsprotected double[]getPosteriorProbabilities0()Returns the posterior probability of the haplotypes given the evidence (uses the internal prior)SnpgetRepresentativeSnp()Simple returns the SNP from the haplotype that has the lowest genome coordinate.booleanhasEvidence()Returns true if evidence has been added, false if the probabilities are just the priors.picard.fingerprint.HaplotypeProbabilitiesUsingLogLikelihoodsmerge(HaplotypeProbabilities other)Merges information from another haplotype probabilities object for the same haplotype into this object.voidsetLogLikelihoods(double[] ll)-
Methods inherited from class picard.fingerprint.HaplotypeProbabilities
getHaplotype, getMostLikelyGenotype, getMostLikelyHaplotype, getObsAllele1, getObsAllele2, getPosteriorLikelihoods, getPriorProbablities, getTotalObs, scaledEvidenceProbabilityUsingGenotypeFrequencies, shiftedLogEvidenceProbability, shiftedLogEvidenceProbabilityGivenOtherEvidence, shiftedLogEvidenceProbabilityUsingGenotypeFrequencies
-
-
-
-
Constructor Detail
-
CappedHaplotypeProbabilities
public CappedHaplotypeProbabilities(HaplotypeProbabilities haplotypeProbabilities, double cap)
-
-
Method Detail
-
deepCopy
public HaplotypeProbabilities deepCopy()
- Specified by:
deepCopyin classHaplotypeProbabilities
-
getRepresentativeSnp
public Snp getRepresentativeSnp()
Simple returns the SNP from the haplotype that has the lowest genome coordinate.- Specified by:
getRepresentativeSnpin classHaplotypeProbabilities
-
hasEvidence
public boolean hasEvidence()
Description copied from class:HaplotypeProbabilitiesReturns true if evidence has been added, false if the probabilities are just the priors.- Overrides:
hasEvidencein classHaplotypeProbabilities
-
merge
public picard.fingerprint.HaplotypeProbabilitiesUsingLogLikelihoods merge(HaplotypeProbabilities other)
Merges information from another haplotype probabilities object for the same haplotype into this object. Useful for when probabilities need to be merged to levels higher than the read group, e.g. the sample or individual.- Specified by:
mergein classHaplotypeProbabilities- Parameters:
other- Another haplotype probabilities object to merge in (must of the the same class and for the same HaplotypeBlock)- Returns:
-
getPosteriorProbabilities0
protected double[] getPosteriorProbabilities0()
Returns the posterior probability of the haplotypes given the evidence (uses the internal prior)
-
getPosteriorProbabilities
public double[] getPosteriorProbabilities()
getter for posteriorProbs- Overrides:
getPosteriorProbabilitiesin classHaplotypeProbabilities
-
getLikelihoods
public double[] getLikelihoods()
Converts the loglikelihoods into linear-space with normalizing.- Specified by:
getLikelihoodsin classHaplotypeProbabilities
-
getLikelihoods0
public double[] getLikelihoods0()
-
getLogLikelihoods
public double[] getLogLikelihoods()
Since this class uses log-rawLikelihoods natively, we override and return the native variable- Overrides:
getLogLikelihoodsin classHaplotypeProbabilities
-
setLogLikelihoods
public void setLogLikelihoods(double[] ll)
-
getLodMostProbableGenotype
public double getLodMostProbableGenotype()
Overridden to calculate the LOD from the loglikelihoods instead of the probabilities because it will allow for more accurate calculation before overflowing.- Overrides:
getLodMostProbableGenotypein classHaplotypeProbabilities
-
-