picard.vcf

## Class GenotypeConcordanceScheme

- java.lang.Object
- - picard.vcf.GenotypeConcordanceScheme

- Direct Known Subclasses:
    GA4GHScheme, GA4GHSchemeWithMissingAsHomRef

      public abstract class GenotypeConcordanceScheme
      extends Object

  This defines for each valid TruthState and CallState tuple, the set of contingency table entries that to which the tuple should contribute.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `EMPTY`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `FN_ONLY`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `FP_FN`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `FP_ONLY`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `FP_TN`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `FP_TN_FN`
    `static GenotypeConcordanceStates.ContingencyState[]` | `NA` These are convenience variables for defining a scheme.
    `protected Map<GenotypeConcordanceStates.TruthAndCallStates,GenotypeConcordanceStates.ContingencyState[]>` | `scheme` The underlying scheme
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TN_FN`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TN_ONLY`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TP_FN`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TP_FP`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TP_FP_FN`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TP_ONLY`
    `protected static GenotypeConcordanceStates.ContingencyState[]` | `TP_TN`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GenotypeConcordanceScheme()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addRow(GenotypeConcordanceStates.CallState callState, GenotypeConcordanceStates.ContingencyState[]... concordanceStateArrays)` Adds a row to the scheme
    `GenotypeConcordanceStates.ContingencyState[]` | `getConcordanceStateArray(GenotypeConcordanceStates.TruthAndCallStates truthAndCallStates)` Get the concordance state array associate with the given truth state and call state tuple.
    `GenotypeConcordanceStates.ContingencyState[]` | `getConcordanceStateArray(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState)` Get the concordance state array associate with the given truth state and call state tuple.
    `Set<GenotypeConcordanceStates.ContingencyState>` | `getContingencyStateSet(GenotypeConcordanceStates.ContingencyState[] contingencyStateArray)` Get the contingency state array as a set
    `String` | `getContingencyStateString(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState)` Get the contingency state array as a parse-able string
    `protected abstract void` | `initiateScheme()`
    `void` | `validateScheme()` Check that all cells in the scheme exist.

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### scheme

          protected final Map<GenotypeConcordanceStates.TruthAndCallStates,GenotypeConcordanceStates.ContingencyState[]> scheme

      The underlying scheme

    - #### NA

          public static final GenotypeConcordanceStates.ContingencyState[] NA

      These are convenience variables for defining a scheme. NA means that such a tuple should never be observed.

    - #### EMPTY

          protected static final GenotypeConcordanceStates.ContingencyState[] EMPTY

    - #### TP_ONLY

          protected static final GenotypeConcordanceStates.ContingencyState[] TP_ONLY

    - #### FP_ONLY

          protected static final GenotypeConcordanceStates.ContingencyState[] FP_ONLY

    - #### TN_ONLY

          protected static final GenotypeConcordanceStates.ContingencyState[] TN_ONLY

    - #### FN_ONLY

          protected static final GenotypeConcordanceStates.ContingencyState[] FN_ONLY

    - #### TP_FN

          protected static final GenotypeConcordanceStates.ContingencyState[] TP_FN

    - #### TP_FP

          protected static final GenotypeConcordanceStates.ContingencyState[] TP_FP

    - #### TP_TN

          protected static final GenotypeConcordanceStates.ContingencyState[] TP_TN

    - #### FP_FN

          protected static final GenotypeConcordanceStates.ContingencyState[] FP_FN

    - #### FP_TN

          protected static final GenotypeConcordanceStates.ContingencyState[] FP_TN

    - #### FP_TN_FN

          protected static final GenotypeConcordanceStates.ContingencyState[] FP_TN_FN

    - #### TP_FP_FN

          protected static final GenotypeConcordanceStates.ContingencyState[] TP_FP_FN

    - #### TN_FN

          protected static final GenotypeConcordanceStates.ContingencyState[] TN_FN

  - ### Constructor Detail

    - #### GenotypeConcordanceScheme

          public GenotypeConcordanceScheme()

  - ### Method Detail

    - #### initiateScheme

          protected abstract void initiateScheme()

    - #### addRow

          protected void addRow(GenotypeConcordanceStates.CallState callState,
                                GenotypeConcordanceStates.ContingencyState[]... concordanceStateArrays)

      Adds a row to the scheme
      Parameters:
        `callState` - the call state (row)
        `concordanceStateArrays` - the concordance state arrays for each truth value, in order

    - #### getConcordanceStateArray

          public GenotypeConcordanceStates.ContingencyState[] getConcordanceStateArray(GenotypeConcordanceStates.TruthState truthState,
                                                                                       GenotypeConcordanceStates.CallState callState)

      Get the concordance state array associate with the given truth state and call state tuple.

    - #### getConcordanceStateArray

          public GenotypeConcordanceStates.ContingencyState[] getConcordanceStateArray(GenotypeConcordanceStates.TruthAndCallStates truthAndCallStates)

      Get the concordance state array associate with the given truth state and call state tuple.

    - #### getContingencyStateString

          public String getContingencyStateString(GenotypeConcordanceStates.TruthState truthState,
                                                  GenotypeConcordanceStates.CallState callState)

      Get the contingency state array as a parse-able string

    - #### getContingencyStateSet

          public Set<GenotypeConcordanceStates.ContingencyState> getContingencyStateSet(GenotypeConcordanceStates.ContingencyState[] contingencyStateArray)

      Get the contingency state array as a set
      Parameters:
        `contingencyStateArray` -
      Returns:

    - #### validateScheme

          public void validateScheme()
                              throws PicardException

      Check that all cells in the scheme exist.
      Throws:
        `PicardException` - if a missing tuple was found.