Class TestResult
java.lang.Object
org.monarchinitiative.lirical.core.analysis.TestResult
- All Implemented Interfaces:
Comparable<TestResult>
This class organizes information about the result of a test. The class is intended to be used together
with the class
AnalysisData
, which contains lists
of observed and excluded HPO terms. For each
disease in the database, the likelihood ratios of these phenotypes is calculated, and the result
for each disease is stored in an object of this class.
This object can include the result of a likelihood ratio for a genotype test. However,
not every disease is associated with a known disease gene. Therefore, if no genotype is available,
genotypeLr
is null.- Version:
- 0.4.5 (2019-10-28)
- Author:
- Peter Robinson
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(TestResult other) Compare two TestResult objects based on theircompositeLR
value.org.monarchinitiative.phenol.ontology.data.TermId
List<org.monarchinitiative.phenol.ontology.data.TermId>
double
double
getExcludedPhenotypeRatio
(int i) double
Calculate the maximum absolute value of any individual likelihood ratio.int
double
getObservedPhenotypeRatio
(int i) List<org.monarchinitiative.phenol.ontology.data.TermId>
static TestResult
of
(org.monarchinitiative.phenol.ontology.data.TermId diseaseId, double pretestProbability, List<LrWithExplanation> observedResults, List<LrWithExplanation> excludedResults, GenotypeLrWithExplanation genotypeLr) double
double
double
double
toString()
-
Method Details
-
of
public static TestResult of(org.monarchinitiative.phenol.ontology.data.TermId diseaseId, double pretestProbability, List<LrWithExplanation> observedResults, List<LrWithExplanation> excludedResults, GenotypeLrWithExplanation genotypeLr) -
observedResults
-
observedTerms
-
excludedResults
-
excludedTerms
-
getCompositeLR
public double getCompositeLR()- Returns:
- the composite likelihood ratio (product of the LRs of the individual tests).
-
getNumberOfTests
public int getNumberOfTests()- Returns:
- the total count of tests performed (excluding genotype).
-
pretestOdds
public double pretestOdds()- Returns:
- the pretest odds.
-
posttestOdds
public double posttestOdds()- Returns:
- the post-test odds.
-
pretestProbability
public double pretestProbability() -
posttestProbability
public double posttestProbability() -
compareTo
Compare two TestResult objects based on theircompositeLR
value.- Specified by:
compareTo
in interfaceComparable<TestResult>
- Parameters:
other
- the "other" TestResult being compared.- Returns:
- comparison result
-
toString
-
getObservedPhenotypeRatio
public double getObservedPhenotypeRatio(int i) - Parameters:
i
- index of the test we are interested in for an observed phenotype- Returns:
- the likelihood ratio of the i'th test
-
getExcludedPhenotypeRatio
public double getExcludedPhenotypeRatio(int i) - Parameters:
i
- index of the test we are interested in for an excluded phenotype- Returns:
- the likelihood ratio of the i'th test
-
diseaseId
public org.monarchinitiative.phenol.ontology.data.TermId diseaseId()- Returns:
- name of the disease being tested.
-
genotypeLr
-
getMaximumIndividualLR
public double getMaximumIndividualLR()Calculate the maximum absolute value of any individual likelihood ratio. This is used to help layout the SVG- Returns:
- maximum abs(LR)
-