Package org.intermine.web.logic.widget
Class EnrichmentInputWidgetLdr
- java.lang.Object
-
- org.intermine.web.logic.widget.EnrichmentInputWidgetLdr
-
- All Implemented Interfaces:
EnrichmentInput
public class EnrichmentInputWidgetLdr extends java.lang.Object implements EnrichmentInput
Executes queries and summarises data for a specific EnrichmentWidgetLdr ready for calculation.- Author:
- Richard Smith, Daniela Butano
-
-
Constructor Summary
Constructors Constructor Description EnrichmentInputWidgetLdr(ObjectStore os, EnrichmentWidgetImplLdr ldr)
Construct with an EnrichmentWidgetLdr that contains queries needed for specific widget tests.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,PopulationInfo>
getAnnotatedCountsInPopulation()
For each attribute give a count of items in the whole population that have that attribute assigned to them, M.java.util.Map<java.lang.String,java.lang.Integer>
getAnnotatedCountsInSample()
For each attribute give a count of items in the sample that have that attribute assigned to them, k.java.util.Map<java.lang.String,java.lang.String>
getLabels()
Get additional display labels for attribute values in the enrichment analysis, these may be names where the values analysed were identifiers.PopulationInfo
getPopulationInfo()
Return a population info instance contanining the population size, N (In our example this is the total number of companies, or possibly the total number of companies that have at least one Department) and the average length of the genes in the whole population.int
getSampleSize()
The sample size, n.int
getTestCount()
The test count represents the number of tests that will be performed.
-
-
-
Constructor Detail
-
EnrichmentInputWidgetLdr
public EnrichmentInputWidgetLdr(ObjectStore os, EnrichmentWidgetImplLdr ldr)
Construct with an EnrichmentWidgetLdr that contains queries needed for specific widget tests. This class executes queries and summarises data ready for calculation.- Parameters:
os
- the ObjectStore to execute queries inldr
- queries to fetch data for a specific widget
-
-
Method Detail
-
getAnnotatedCountsInPopulation
public java.util.Map<java.lang.String,PopulationInfo> getAnnotatedCountsInPopulation()
Description copied from interface:EnrichmentInput
For each attribute give a count of items in the whole population that have that attribute assigned to them, M. In our example: for each department the count of companies that contain the department.- Specified by:
getAnnotatedCountsInPopulation
in interfaceEnrichmentInput
- Returns:
- a map from attribute value to the count of items in the population with that value
-
getAnnotatedCountsInSample
public java.util.Map<java.lang.String,java.lang.Integer> getAnnotatedCountsInSample()
Description copied from interface:EnrichmentInput
For each attribute give a count of items in the sample that have that attribute assigned to them, k. In our example: for each department the count of companies in the sample that contain the department.- Specified by:
getAnnotatedCountsInSample
in interfaceEnrichmentInput
- Returns:
- a map from attribute value to the count of items in the sample with that value
-
getLabels
public java.util.Map<java.lang.String,java.lang.String> getLabels()
Description copied from interface:EnrichmentInput
Get additional display labels for attribute values in the enrichment analysis, these may be names where the values analysed were identifiers.- Specified by:
getLabels
in interfaceEnrichmentInput
- Returns:
- labels for each attribute value in the sample
-
getPopulationInfo
public PopulationInfo getPopulationInfo()
Description copied from interface:EnrichmentInput
Return a population info instance contanining the population size, N (In our example this is the total number of companies, or possibly the total number of companies that have at least one Department) and the average length of the genes in the whole population.- Specified by:
getPopulationInfo
in interfaceEnrichmentInput
- Returns:
- the population info instance
-
getSampleSize
public int getSampleSize()
Description copied from interface:EnrichmentInput
The sample size, n. The number of items from the whole population that are in the sample, in our example this is the number of companies in the subset.- Specified by:
getSampleSize
in interfaceEnrichmentInput
- Returns:
- the sample size
-
getTestCount
public int getTestCount()
Description copied from interface:EnrichmentInput
The test count represents the number of tests that will be performed. This is the number of unique attribute values applied across all items in the population. For example, a count of the unique departments observed in all companies in the population.- Specified by:
getTestCount
in interfaceEnrichmentInput
- Returns:
- the number of tests to be performed
-
-