Package picard.fingerprint
Class HaplotypeProbabilitiesFromContaminatorSequence
- java.lang.Object
-
- picard.fingerprint.HaplotypeProbabilities
-
- picard.fingerprint.HaplotypeProbabilitiesFromSequence
-
- picard.fingerprint.HaplotypeProbabilitiesFromContaminatorSequence
-
public class HaplotypeProbabilitiesFromContaminatorSequence extends HaplotypeProbabilitiesFromSequence
Represents the probability of the underlying haplotype of the contaminating sample given the data. By convention the alleles stored for each SNP are in phase.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class picard.fingerprint.HaplotypeProbabilities
HaplotypeProbabilities.Genotype
-
-
Field Summary
Fields Modifier and Type Field Description doublecontamination-
Fields inherited from class picard.fingerprint.HaplotypeProbabilitiesFromSequence
obsAllele1, obsAllele2, obsAlleleOther
-
-
Constructor Summary
Constructors Constructor Description HaplotypeProbabilitiesFromContaminatorSequence(HaplotypeBlock haplotypeBlock, double contamination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToProbs(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()getter for likelihoods;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 loglikelihoods natively, we override and return the native variabledouble[]getPosteriorProbabilities()getter for posteriorsSnpgetRepresentativeSnp()Simple returns the SNP from the haplotype that has the lowest genome coordinate.voidmerge(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.HaplotypeProbabilitiesFromSequence
getFractionUnexpectedAlleleObs, getObsAllele1, getObsAllele2, getTotalObs, hasEvidence
-
Methods inherited from class picard.fingerprint.HaplotypeProbabilities
getHaplotype, getMostLikelyGenotype, getMostLikelyHaplotype, getPriorProbablities, scaledEvidenceProbabilityUsingGenotypeFrequencies, shiftedLogEvidenceProbability, shiftedLogEvidenceProbabilityGivenOtherEvidence, shiftedLogEvidenceProbabilityUsingGenotypeFrequencies
-
-
-
-
Constructor Detail
-
HaplotypeProbabilitiesFromContaminatorSequence
public HaplotypeProbabilitiesFromContaminatorSequence(HaplotypeBlock haplotypeBlock, double contamination)
-
-
Method Detail
-
addToProbs
public 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.- Overrides:
addToProbsin classHaplotypeProbabilitiesFromSequence- Parameters:
snp- The snp in the HaplotypeBlock to which evidence is being addedbase- the base observedqual- the quality of the observed base
-
merge
public void merge(HaplotypeProbabilities other)
Description copied from class:HaplotypeProbabilitiesFromSequenceMerges 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.- Overrides:
mergein classHaplotypeProbabilitiesFromSequence- Parameters:
other- Another haplotype probabilities object to merge in
-
getLogLikelihoods
public double[] getLogLikelihoods()
Since this class uses loglikelihoods natively, we override and return the native variable
-
getRepresentativeSnp
public Snp getRepresentativeSnp()
Simple returns the SNP from the haplotype that has the lowest genome coordinate.- Specified by:
getRepresentativeSnpin classHaplotypeProbabilities
-
getPosteriorProbabilities
public double[] getPosteriorProbabilities()
getter for posteriors- Overrides:
getPosteriorProbabilitiesin classHaplotypeProbabilities
-
getLikelihoods
public double[] getLikelihoods()
getter for likelihoods;- Specified by:
getLikelihoodsin 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
-
-