# Class HaplotypeProbabilityOfNormalGivenTumor

java.lang.Object
picard.fingerprint.HaplotypeProbabilities
picard.fingerprint.HaplotypeProbabilityOfNormalGivenTumor

public class HaplotypeProbabilityOfNormalGivenTumor extends HaplotypeProbabilities
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 HaplotypeProbabilities

`HaplotypeProbabilities.Genotype`

## Constructor Summary

Constructors
Constructor
Description
`HaplotypeProbabilityOfNormalGivenTumor(HaplotypeProbabilities hpOfTumor, double pLoH)`
`HaplotypeProbabilityOfNormalGivenTumor(HaplotypeProbabilityOfNormalGivenTumor other)`

## Method Summary

Modifier and Type
Method
Description
`HaplotypeProbabilityOfNormalGivenTumor`
`deepCopy()`
`double[]`
`getLikelihoods()`
Returns the likelihoods, in order, of the AA, Aa and aa haplotypes given the evidence
`int`
`getObsAllele1()`
Returns the number of observations of alleles supporting the first/major haplotype allele.
`int`
`getObsAllele2()`
Returns the number of observations of alleles supporting the second/minor haplotype allele.
`Snp`
`getRepresentativeSnp()`
Returns a representative SNP for this haplotype.
`int`
`getTotalObs()`
Returns the total number of observations of any allele.
`boolean`
`hasEvidence()`
Returns true if evidence has been added, false if the probabilities are just the priors.
`HaplotypeProbabilityOfNormalGivenTumor`
`merge(HaplotypeProbabilities other)`
Merges in the likelihood information from the supplied haplotype probabilities object.

### Methods inherited from class HaplotypeProbabilities

`getHaplotype, getLodMostProbableGenotype, getLogLikelihoods, getMostLikelyGenotype, getMostLikelyHaplotype, getPosteriorLikelihoods, getPosteriorProbabilities, getPriorProbablities, scaledEvidenceProbabilityUsingGenotypeFrequencies, shiftedLogEvidenceProbability, shiftedLogEvidenceProbabilityGivenOtherEvidence, shiftedLogEvidenceProbabilityUsingGenotypeFrequencies`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### HaplotypeProbabilityOfNormalGivenTumor

public HaplotypeProbabilityOfNormalGivenTumor(HaplotypeProbabilityOfNormalGivenTumor other)

### HaplotypeProbabilityOfNormalGivenTumor

public HaplotypeProbabilityOfNormalGivenTumor(HaplotypeProbabilities hpOfTumor, double pLoH)

## Method Details

### getLikelihoods

public double[] getLikelihoods()
Description copied from class: `HaplotypeProbabilities`
Returns the likelihoods, in order, of the AA, Aa and aa haplotypes given the evidence

Mathematically this is P(evidence | haplotype) where haplotype={AA,Aa,aa}. Will be normalized.

Specified by:
  `getLikelihoods` in class `HaplotypeProbabilities`

### getRepresentativeSnp

public Snp getRepresentativeSnp()
Description copied from class: `HaplotypeProbabilities`
Returns 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:
  `getRepresentativeSnp` in class `HaplotypeProbabilities`

### merge

public HaplotypeProbabilityOfNormalGivenTumor merge(HaplotypeProbabilities other)
Description copied from class: `HaplotypeProbabilities`
Merges in the likelihood information from the supplied haplotype probabilities object.

Specified by:
  `merge` in class `HaplotypeProbabilities`

### deepCopy

public HaplotypeProbabilityOfNormalGivenTumor deepCopy()

Specified by:
  `deepCopy` in class `HaplotypeProbabilities`

### getObsAllele1

public int getObsAllele1()
Description copied from class: `HaplotypeProbabilities`
Returns 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:
  `getObsAllele1` in class `HaplotypeProbabilities`
Returns:
  int

### getObsAllele2

public int getObsAllele2()
Description copied from class: `HaplotypeProbabilities`
Returns 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:
  `getObsAllele2` in class `HaplotypeProbabilities`
Returns:
  int

### getTotalObs

public int getTotalObs()
Description copied from class: `HaplotypeProbabilities`
Returns 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:
  `getTotalObs` in class `HaplotypeProbabilities`
Returns:
  int

### hasEvidence

public boolean hasEvidence()
Description copied from class: `HaplotypeProbabilities`
Returns true if evidence has been added, false if the probabilities are just the priors.

Overrides:
  `hasEvidence` in class `HaplotypeProbabilities`