Package org.intermine.web.logic.widget
Interface CorrectionCoefficient
-
public interface CorrectionCoefficient
An Interface which defines when/how a correction coefficient can be applied to the results obtained by a enrichment widget- Author:
- Daniela Butano
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
apply(java.util.Map<java.lang.String,java.math.BigDecimal> pValuesPerTerm, PopulationInfo population, java.util.Map<java.lang.String,PopulationInfo> annotatedPopulationInfo, java.lang.Double maxValue)
Apply the correction coefficient to the pValuesTerm given in inputjava.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>>
getOutputInfo(java.lang.String correctionCoefficientInput)
Return the key value pairs to put in the webservice resultboolean
isApplicable()
Return true if the correction coefficient is applicableboolean
isSelected(java.lang.String correctionCoefficientInput)
Return true if the correction coefficient is selectedvoid
updatePopulationQuery(Query q, Query subQ, QueryField qf)
Update the annotated population query given in input using the queryfield specific for the correctionQueryField
updateQueryWithCorrectionCoefficient(Query query, QueryClass qc)
Update the query, given in input, with the field associated with the correction coefficient and return a query field.
-
-
-
Method Detail
-
isApplicable
boolean isApplicable()
Return true if the correction coefficient is applicable- Returns:
- true/false
-
isSelected
boolean isSelected(java.lang.String correctionCoefficientInput)
Return true if the correction coefficient is selected- Parameters:
correctionCoefficientInput
- Some input string.- Returns:
- true/false
-
updateQueryWithCorrectionCoefficient
QueryField updateQueryWithCorrectionCoefficient(Query query, QueryClass qc)
Update the query, given in input, with the field associated with the correction coefficient and return a query field.- Parameters:
query
- The query to adjust.qc
- A query class - but for what??- Returns:
- the query field
-
updatePopulationQuery
void updatePopulationQuery(Query q, Query subQ, QueryField qf)
Update the annotated population query given in input using the queryfield specific for the correction- Parameters:
q
- the annotated population querysubQ
- the subquery used in the population queryqf
- the query field specific for the correction
-
apply
void apply(java.util.Map<java.lang.String,java.math.BigDecimal> pValuesPerTerm, PopulationInfo population, java.util.Map<java.lang.String,PopulationInfo> annotatedPopulationInfo, java.lang.Double maxValue)
Apply the correction coefficient to the pValuesTerm given in input- Parameters:
pValuesPerTerm
- The p-values for each term.population
- The background population.annotatedPopulationInfo
- a mapping from term(?) to population info.maxValue
- the maximum value to return, ranges from 0.5 (default value) to 1.0. determined by user, for display reasons.
-
getOutputInfo
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Object>> getOutputInfo(java.lang.String correctionCoefficientInput)
Return the key value pairs to put in the webservice result- Parameters:
correctionCoefficientInput
- the value to use to constrain the coefficient.- Returns:
- a JSON serialisable object.
-
-