Package picard.fingerprint
Class HaplotypeProbabilityOfNormalGivenTumor
java.lang.Object
picard.fingerprint.HaplotypeProbabilities
picard.fingerprint.HaplotypeProbabilityOfNormalGivenTumor
A wrapper class for any HaplotypeProbabilities instance that will assume that the given evidence is that of a tumor sample and
provide an hp for the normal sample that tumor came from. This models possible loss of heterozygosity where het genotypes
turn into a homozygous genotype with probability pLoH.
The shortcoming of this model is that we assume that the events are all independent, but this way they are allowed.
-
Nested Class Summary
Nested classes/interfaces inherited from class picard.fingerprint.HaplotypeProbabilities
HaplotypeProbabilities.Genotype -
Constructor Summary
ConstructorsConstructorDescriptionHaplotypeProbabilityOfNormalGivenTumor(HaplotypeProbabilities hpOfTumor, double pLoH) -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()double[]Returns the likelihoods, in order, of the AA, Aa and aa haplotypes given the evidenceintReturns the number of observations of alleles supporting the first/major haplotype allele.intReturns the number of observations of alleles supporting the second/minor haplotype allele.Returns a representative SNP for this haplotype.intReturns the total number of observations of any allele.booleanReturns true if evidence has been added, false if the probabilities are just the priors.merge(HaplotypeProbabilities other) Merges in the likelihood information from the supplied haplotype probabilities object.Methods inherited from class picard.fingerprint.HaplotypeProbabilities
getHaplotype, getLodMostProbableGenotype, getLogLikelihoods, getMostLikelyGenotype, getMostLikelyHaplotype, getPosteriorLikelihoods, getPosteriorProbabilities, getPriorProbablities, scaledEvidenceProbabilityUsingGenotypeFrequencies, shiftedLogEvidenceProbability, shiftedLogEvidenceProbabilityGivenOtherEvidence, shiftedLogEvidenceProbabilityUsingGenotypeFrequencies
-
Constructor Details
-
HaplotypeProbabilityOfNormalGivenTumor
-
HaplotypeProbabilityOfNormalGivenTumor
-
-
Method Details
-
getLikelihoods
public double[] getLikelihoods()Description copied from class:HaplotypeProbabilitiesReturns the likelihoods, in order, of the AA, Aa and aa haplotypes given the evidenceMathematically this is P(evidence | haplotype) where haplotype={AA,Aa,aa}. Will be normalized.
- Specified by:
getLikelihoodsin classHaplotypeProbabilities
-
getRepresentativeSnp
Description copied from class:HaplotypeProbabilitiesReturns a representative SNP for this haplotype. Different subclasses may implement this in different ways, but should do so in a deterministic/repeatable fashion.- Specified by:
getRepresentativeSnpin classHaplotypeProbabilities
-
merge
Description copied from class:HaplotypeProbabilitiesMerges in the likelihood information from the supplied haplotype probabilities object.- Specified by:
mergein classHaplotypeProbabilities
-
deepCopy
- Specified by:
deepCopyin classHaplotypeProbabilities
-
getObsAllele1
public int getObsAllele1()Description copied from class:HaplotypeProbabilitiesReturns the number of observations of alleles supporting the first/major haplotype allele. Strictly this doesn't make sense for all subclasses, but it's nice to have it part of the API so a default implementation is provided here.- Overrides:
getObsAllele1in classHaplotypeProbabilities- Returns:
- int
-
getObsAllele2
public int getObsAllele2()Description copied from class:HaplotypeProbabilitiesReturns the number of observations of alleles supporting the second/minor haplotype allele. Strictly this doesn't make sense for all subclasses, but it's nice to have it part of the API so a default implementation is provided here.- Overrides:
getObsAllele2in classHaplotypeProbabilities- Returns:
- int
-
getTotalObs
public int getTotalObs()Description copied from class:HaplotypeProbabilitiesReturns the total number of observations of any allele. Strictly this doesn't make sense for all subclasses, but it's nice to have it part of the API so a default implementation is provided here.- Overrides:
getTotalObsin classHaplotypeProbabilities- Returns:
- int
-
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
-