Class EnrichmentWidgetImplLdr


  • public class EnrichmentWidgetImplLdr
    extends WidgetLdr
    Implement methods to access data an enrichment calculation needs to be provided with.
    Author:
    Daniela Butano
    • 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 selected
        correctionCoefficient - a instance of correction coefficient
        applyCorrectionCoefficient -
        ids - list of IDs to analyse, use instead of intermine bag if bag is NULL
        populationIds - 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 exported
        action - 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