Package org.intermine.web.logic.widget
Class EnrichmentWidgetImplLdr
- java.lang.Object
-
- org.intermine.web.logic.widget.WidgetLdr
-
- org.intermine.web.logic.widget.EnrichmentWidgetImplLdr
-
public class EnrichmentWidgetImplLdr extends WidgetLdr
Implement methods to access data an enrichment calculation needs to be provided with.- Author:
- Daniela Butano
-
-
Field Summary
-
Fields inherited from class org.intermine.web.logic.widget.WidgetLdr
bag, filter, ids, os, queryClassInQuery, startClass
-
-
Constructor Summary
Constructors Constructor Description EnrichmentWidgetImplLdr(InterMineBag bag, InterMineBag populationBag, ObjectStore os, EnrichmentWidgetConfig config, java.lang.String filter, boolean extraCorrectionCoefficient, CorrectionCoefficient correctionCoefficient, java.lang.String ids, java.lang.String populationIds)
Construct an Enrichment widget loader, which performs the queries needed for enrichment statistics.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Query
getExportQuery(java.util.List<java.lang.String> keys)
Query
getPopulationQuery(boolean calcTotal)
Query
getQuery(java.lang.String action, java.util.List<java.lang.String> keys)
Returns the relevant query.Query
getSampleQuery(boolean calcTotal)
-
Methods inherited from class org.intermine.web.logic.widget.WidgetLdr
addReference, buildQueryValue, createAttributePath, createQueryFieldByPath
-
-
-
-
Constructor Detail
-
EnrichmentWidgetImplLdr
public EnrichmentWidgetImplLdr(InterMineBag bag, InterMineBag populationBag, ObjectStore os, EnrichmentWidgetConfig config, java.lang.String filter, boolean extraCorrectionCoefficient, CorrectionCoefficient correctionCoefficient, java.lang.String ids, java.lang.String populationIds)
Construct an Enrichment widget loader, which performs the queries needed for enrichment statistics.- Parameters:
bag
- The bag containing the items we are interested in examining.populationBag
- The bag containing the background population for this test (MAY BE NULL).os
- The connection to the Object Store database.config
- The configuration detailing the kind of enrichment to do.filter
- An optional filter value.extraCorrectionCoefficient
- if true correction coefficient has been selectedcorrectionCoefficient
- a instance of correction coefficientapplyCorrectionCoefficient
-ids
- list of IDs to analyse, use instead of intermine bag if bag is NULLpopulationIds
- use instead of populationBag
-
-
Method Detail
-
getQuery
public Query getQuery(java.lang.String action, java.util.List<java.lang.String> keys)
Returns the relevant query. this method is used for 6 widget queries. export query: select identifier and term where key = what the user selected on the widget analysed query: select object.id where object is used in query the results of this query are used as a NOT_IN constraint in a pathquery. the pathquery is run when the user clicks on the 'not analysed' number on the widget. population query: M = total annotated with this term in reference population annotated population query: N = total annotated with any term in reference population sample query: k = total annotated with this term in bag annotated sample query: n = total annotated with any term in bag (used to be bag.count)- Parameters:
keys
- the keys of the records to be exportedaction
- which query to be built.- Returns:
- query to return the correct result set for this widget
-
getSampleQuery
public Query getSampleQuery(boolean calcTotal)
- Parameters:
calcTotal
- whether or not to calculate the total number of annotated objects in the sample- Returns:
- the query representing the sample population (the list)
-
getPopulationQuery
public Query getPopulationQuery(boolean calcTotal)
- Parameters:
calcTotal
- whether or not to calculate the total number of annotated objects in the database- Returns:
- the query representing the entire population (all the items in the database)
-
getExportQuery
public Query getExportQuery(java.util.List<java.lang.String> keys)
- Parameters:
keys
- the keys to the records to be exported- Returns:
- the query representing the records to be exported
-
-