Package picard.vcf
Class GenotypeConcordanceCounts
java.lang.Object
picard.vcf.GenotypeConcordanceCounts
A class to store the counts for various truth and call state classifications relative to a reference. With these counts and a provided
scheme, summary metrics can be returned.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateGenotypeConcordance(GenotypeConcordanceScheme scheme, boolean missingSitesFlag) Genotype Concordance is the number of times the truth and call states match exactly / all truth and call combinations made If the GA4GH scheme is being used, any MISSING sites in truth OR call will not be included in the discordance calculations.doublecalculateNonRefGenotypeConcordance(GenotypeConcordanceScheme scheme, boolean missingSitesFlag) Non Ref Genotype Concordance is the number of times the truth and call states match exactly for *vars only* / all truth and call *var* combinations made If the GA4GH scheme is being used, any MISSING sites in truth OR call will not be included in the discordance calculations.Returns the total number of times each contingency state is encountered, summed across all truth/call state pairs.longgetCount(GenotypeConcordanceStates.TruthAndCallStates truthAndCallStates) Returns the count defined by the truth state set and call state set.longgetCount(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState) Returns the count defined by the truth state set and call state set.doubledoublegetSensitivity(GenotypeConcordanceScheme scheme, GenotypeConcordanceStates.TruthState[] truthStateArray) Returns the sensitivity defined by the scheme across the subset of truth states.doublegetSpecificity(GenotypeConcordanceScheme scheme, GenotypeConcordanceStates.TruthState[] truthStateArray) Returns the specificity defined by the scheme across the subset of truth states.longgetSum()Returns the sum of all pairs of tuples defined by the truth state set and call state set.longgetSum(Set<GenotypeConcordanceStates.TruthState> truthStateSet, Set<GenotypeConcordanceStates.CallState> callStateSet) Returns the sum of all pairs of tuples defined by the truth state set and call state set.voidincrement(GenotypeConcordanceStates.TruthAndCallStates truthAndCallStates) Increments a count for the truth/call state tuple.voidincrement(GenotypeConcordanceStates.TruthAndCallStates truthAndCallStates, double count) booleanisMissing(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState) Returns true if EITHER the truth or call state is MISSING.booleanisVar(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState) Returns true if EITHER the truth or call state is a VAR.doublePpv(GenotypeConcordanceScheme scheme, GenotypeConcordanceStates.CallState[] callStateList) Returns the PPV defined by the scheme across the subset of call states.voidValidates that there are no counts for NA states in the underlying scheme
-
Constructor Details
-
GenotypeConcordanceCounts
public GenotypeConcordanceCounts()
-
-
Method Details
-
increment
Increments a count for the truth/call state tuple.- Parameters:
truthAndCallStates-
-
increment
public void increment(GenotypeConcordanceStates.TruthAndCallStates truthAndCallStates, double count) -
getCounterSize
public double getCounterSize() -
validateCountsAgainstScheme
Validates that there are no counts for NA states in the underlying scheme -
calculateGenotypeConcordance
public double calculateGenotypeConcordance(GenotypeConcordanceScheme scheme, boolean missingSitesFlag) Genotype Concordance is the number of times the truth and call states match exactly / all truth and call combinations made If the GA4GH scheme is being used, any MISSING sites in truth OR call will not be included in the discordance calculations. -
calculateNonRefGenotypeConcordance
public double calculateNonRefGenotypeConcordance(GenotypeConcordanceScheme scheme, boolean missingSitesFlag) Non Ref Genotype Concordance is the number of times the truth and call states match exactly for *vars only* / all truth and call *var* combinations made If the GA4GH scheme is being used, any MISSING sites in truth OR call will not be included in the discordance calculations. -
getSensitivity
public double getSensitivity(GenotypeConcordanceScheme scheme, GenotypeConcordanceStates.TruthState[] truthStateArray) Returns the sensitivity defined by the scheme across the subset of truth states. -
Ppv
public double Ppv(GenotypeConcordanceScheme scheme, GenotypeConcordanceStates.CallState[] callStateList) Returns the PPV defined by the scheme across the subset of call states. -
getSpecificity
public double getSpecificity(GenotypeConcordanceScheme scheme, GenotypeConcordanceStates.TruthState[] truthStateArray) Returns the specificity defined by the scheme across the subset of truth states. -
getCount
public long getCount(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState) Returns the count defined by the truth state set and call state set. -
getCount
Returns the count defined by the truth state set and call state set. -
isVar
public boolean isVar(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState) Returns true if EITHER the truth or call state is a VAR. Used for calculating non ref genotype concordance. -
isMissing
public boolean isMissing(GenotypeConcordanceStates.TruthState truthState, GenotypeConcordanceStates.CallState callState) Returns true if EITHER the truth or call state is MISSING. Used for calculating genotype concordance and non-ref genotype concordance when the GA4GH scheme is used. -
getSum
public long getSum(Set<GenotypeConcordanceStates.TruthState> truthStateSet, Set<GenotypeConcordanceStates.CallState> callStateSet) Returns the sum of all pairs of tuples defined by the truth state set and call state set. -
getSum
public long getSum()Returns the sum of all pairs of tuples defined by the truth state set and call state set. -
getContingencyStateCounts
public Map<GenotypeConcordanceStates.ContingencyState,Long> getContingencyStateCounts(GenotypeConcordanceScheme scheme) Returns the total number of times each contingency state is encountered, summed across all truth/call state pairs.
-