Class ExpressionExperimentController


  • @Controller
    @RequestMapping({"/expressionExperiment","/ee"})
    public class ExpressionExperimentController
    extends Object
    Author:
    keshav
    • Constructor Detail

      • ExpressionExperimentController

        public ExpressionExperimentController()
    • Method Detail

      • browse

        public JsonReaderResponse<ExpressionExperimentDetailsValueObject> browse​(ListBatchCommand batch)
        AJAX call for remote paging store security isn't incorporated in db query, so paging needs to occur at higher level.
        1. a db call returns all experiments, which are filtered by the service method
        2. if the user is an admin, we filter out the troubled experiments
        3. an appropriate page-sized chunk is then taken from this (filtered) list
        4. another round of db calls create and fill value objects for this chunk
        5. value objects are returned
      • canCurrentUserEditExperiment

        public boolean canCurrentUserEditExperiment​(Long eeId)
        AJAX returns a JSON string encoding whether the current user owns the experiment and whether they can edit it
      • clearFromCaches

        public void clearFromCaches​(Long eeId)
        AJAX clear entries in caches relevant to experimental design for the experiment passed in. The caches cleared are the processedDataVectorCache and the caches held in ExperimentalDesignVisualizationService
      • deleteById

        @Secured("GROUP_USER")
        public String deleteById​(Long id)
        Exposed for AJAX calls.
      • doesCurrentUserOwnExperiment

        public boolean doesCurrentUserOwnExperiment​(Long eeId)
        AJAX returns a JSON string encoding whether the current user owns the experiment and whether they can edit it
      • filter

        @RequestMapping(value="/filterExpressionExperiments.html",
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView filter​(@RequestParam("filter")
                                                                   String searchString)
      • find

        public Collection<Long> find​(String query,
                                     Long taxonId)
        AJAX TODO --- include a search of subsets. NOTE: only used via DataSetSearchAndGrabToolbar -> DatasetGroupEditor?
        Parameters:
        query - search string
        taxonId - (if null, all taxa are searched)
        Returns:
        EE ids that match
      • getDescription

        public String getDescription​(Long id)
        AJAX call
        Returns:
        a more informative description than the regular description 1st 120 characters of ee.description + Experimental Design information returned string contains HTML tags. TODO: Would be more generic if passed back a DescriptionValueObject that contains all the info necessary to reconstruct the HTML on the client side Currently only used by ExpressionExperimentGrid.js (row expander)
      • loadCountsForDataSummaryTable

        public Map<String,​Object> loadCountsForDataSummaryTable()
        AJAX method to get data for database summary table, returned as a JSON object the slow part here is loading each new or updated object in whatsNewService.retrieveReport() -> fetch()
        Returns:
        json
      • loadExpressionExperimentDetails

        public ExpressionExperimentDetailsValueObject loadExpressionExperimentDetails​(Long id)
        AJAX; Populate all the details.
        Parameters:
        id - Identifier for the experiment
        Returns:
        ee details vo
      • recalculateBatchConfound

        public void recalculateBatchConfound​(Long id)
      • recalculateBatchEffect

        public void recalculateBatchEffect​(Long id)
      • runGeeq

        public void runGeeq​(Long id,
                            String mode)
      • loadExperimentsForPlatform

        public Collection<ExpressionExperimentDetailsValueObject> loadExperimentsForPlatform​(Long id)
        AJAX get experiments that used a given platform. Don't retrieve too much detail.
        Parameters:
        id - of platform
        Returns:
        collection of experiments that use this platform -- including those that were switched
      • loadExpressionExperimentsWithQcIssues

        public JsonReaderResponse<Map<String,​Object>> loadExpressionExperimentsWithQcIssues()
        AJAX; get a collection of experiments that have had samples removed due to outliers TODO: and experiment that have possible batch effects detected
        Returns:
        json reader response
      • loadQuantitationTypes

        public Collection<QuantitationTypeValueObject> loadQuantitationTypes​(Long eeId)
        AJAX - for display in tables
        Parameters:
        eeId - ee id
        Returns:
        security-filtered set of value objects.
      • loadStatusSummaries

        public Collection<ExpressionExperimentDetailsValueObject> loadStatusSummaries​(Long taxonId,
                                                                                      List<Long> ids,
                                                                                      Integer limit,
                                                                                      Integer filter,
                                                                                      Boolean showPublic)
        AJAX. Data summarizing the status of experiments.
        Parameters:
        taxonId - can be null
        limit - If >0, get the most recently updated N experiments, where N <= limit; or if < 0, get the least recently updated; if 0, or null, return all.
        filter - if non-null, limit data sets to ones meeting criteria.
        showPublic - return user's public datasets too
        Returns:
        ee details vos
      • removePrimaryPublication

        @Secured("GROUP_USER")
        public String removePrimaryPublication​(Long eeId)
        Remove the primary publication for the given expression experiment (by id). The reference is not actually deleted from the system. AJAX
        Parameters:
        eeId - ee id
        Returns:
        string
      • searchExperimentsAndExperimentGroups

        public List<SearchResultDisplayObject> searchExperimentsAndExperimentGroups​(String query,
                                                                                    Long taxonId)
        AJAX (used by experimentAndExperimentGroupCombo.js)
        Parameters:
        taxonId - if the search should not be limited by taxon, pass in null
        query - query
        Returns:
        Collection of SearchResultDisplayObjects
      • searchExpressionExperiments

        public Collection<ExpressionExperimentValueObject> searchExpressionExperiments​(String query)
        AJAX (used by ExperimentCombo.js)
        Parameters:
        query - query
        Returns:
        Collection of expression experiment entity objects
      • showAllExpressionExperiments

        @RequestMapping(value={"/showAllExpressionExperiments.html","/showAll"},
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showAllExpressionExperiments()
        Show all experiments (optionally conditioned on either a taxon, a list of ids, or a platform)
      • showAllLinkSummaries

        @RequestMapping(value={"/showAllExpressionExperimentLinkSummaries.html","/manage.html"},
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showAllLinkSummaries()
      • showBioAssays

        @RequestMapping(value={"/showBioAssaysFromExpressionExperiment.html","/bioAssays"},
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showBioAssays​(@RequestParam("id")
                                                                          Long id,
                                                                          @RequestParam(value="platform",required=false)
                                                                          Long platformId)
      • showBioMaterials

        @RequestMapping(value={"/showBioMaterialsFromExpressionExperiment.html","/bioMaterials"},
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showBioMaterials​(@RequestParam("id")
                                                                             Long id)
      • showExpressionExperimentById

        @RequestMapping(value={"/showExpressionExperiment.html","/","/show"},
                        params="id",
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showExpressionExperimentById​(@RequestParam("id")
                                                                                         Long id)
      • showExpressionExperimentByShortName

        @RequestMapping(value={"/showExpressionExperiment.html","/","/show"},
                        params="shortName",
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showExpressionExperimentByShortName​(@RequestParam("shortName")
                                                                                                String shortName)
      • showAllSubSets

        @RequestMapping(value={"/showAllExpressionExperimentSubSets.html","/showSubsets"},
                        method={GET,HEAD},
                        params="id")
        public org.springframework.web.servlet.ModelAndView showAllSubSets​(@RequestParam("id")
                                                                           Long id,
                                                                           @RequestParam(value="dimension",required=false)
                                                                           Long dimensionId)
      • showAllSubSets

        @RequestMapping(value={"/showAllExpressionExperimentSubSets.html","/showSubsets"},
                        method={GET,HEAD},
                        params="shortName")
        public org.springframework.web.servlet.ModelAndView showAllSubSets​(@RequestParam("shortName")
                                                                           String shortName,
                                                                           @RequestParam(value="dimension",required=false)
                                                                           Long dimensionId)
      • showSubSet

        @RequestMapping(value={"/showExpressionExperimentSubSet.html","/showSubset"},
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView showSubSet​(@RequestParam("id")
                                                                       Long id,
                                                                       @RequestParam(value="dimension",required=false)
                                                                       Long dimensionId)
        Shows a list of BioAssays for an expression experiment subset.
      • unmatchAllBioAssays

        public void unmatchAllBioAssays​(Long eeId)
        Completely reset the pairing of bioassays to biomaterials, so they are no longer paired. New biomaterials are constructed where necessary; they retain the characteristics of the original. Experimental design might need to be redone after this operation. (AJAX)
        Parameters:
        eeId - ee id
      • updatePubMed

        @Secured("GROUP_USER")
        public String updatePubMed​(Long eeId,
                                   String pubmedId)
        AJAX. Associate the given pubmedId with the given expression experiment.
        Parameters:
        eeId - ee id
        pubmedId - pubmed id
        Returns:
        string
      • handleRequestInternal

        @RequestMapping(value="/downloadExpressionExperimentList.html",
                        method={GET,HEAD})
        public org.springframework.web.servlet.ModelAndView handleRequestInternal​(@RequestParam(value="e",required=false)
                                                                                  String e,
                                                                                  @RequestParam(value="es",required=false)
                                                                                  String es,
                                                                                  @RequestParam(value="esn",required=false)
                                                                                  String esn)