Search in sources :

Example 1 with CompositeSequenceMapValueObject

use of ubic.gemma.core.analysis.sequence.CompositeSequenceMapValueObject in project Gemma by PavlidisLab.

the class CompositeSequenceController method filter.

@RequestMapping("/filter")
public ModelAndView filter(HttpServletRequest request, HttpServletResponse response) {
    String filter = request.getParameter("filter");
    String arid = request.getParameter("arid");
    ModelAndView mav = new ModelAndView("compositeSequences.geneMap");
    // Validate the filtering search criteria.
    if (StringUtils.isBlank(filter)) {
        mav.getModel().put("message", "No search critera provided");
    // return showAll( request, response );
    } else {
        Collection<CompositeSequenceMapValueObject> compositeSequenceSummary = search(filter, arid);
        if ((compositeSequenceSummary == null) || (compositeSequenceSummary.size() == 0)) {
            mav.getModel().put("message", "Your search yielded no results");
            compositeSequenceSummary = new ArrayList<>();
        } else {
            mav.getModel().put("message", compositeSequenceSummary.size() + " probes matched your search.");
        }
        mav.addObject("arrayDesign", loadArrayDesign(arid));
        mav.addObject("sequenceData", compositeSequenceSummary);
        mav.addObject("numCompositeSequences", compositeSequenceSummary.size());
    }
    return mav;
}
Also used : ModelAndView(org.springframework.web.servlet.ModelAndView) CompositeSequenceMapValueObject(ubic.gemma.core.analysis.sequence.CompositeSequenceMapValueObject) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 2 with CompositeSequenceMapValueObject

use of ubic.gemma.core.analysis.sequence.CompositeSequenceMapValueObject in project Gemma by PavlidisLab.

the class ArrayDesignControllerImpl method showCompositeSequences.

@Override
@RequestMapping("/showCompositeSequenceSummary.html")
public ModelAndView showCompositeSequences(HttpServletRequest request) {
    String arrayDesignIdStr = request.getParameter("id");
    if (arrayDesignIdStr == null) {
        // should be a validation error, on 'submit'.
        throw new EntityNotFoundException("Must provide a platform name or Id");
    }
    ArrayDesign arrayDesign = arrayDesignService.load(Long.parseLong(arrayDesignIdStr));
    ModelAndView mav = new ModelAndView("compositeSequences.geneMap");
    if (!AJAX) {
        Collection<CompositeSequenceMapValueObject> compositeSequenceSummary = getDesignSummaries(arrayDesign);
        if (compositeSequenceSummary == null || compositeSequenceSummary.size() == 0) {
            throw new RuntimeException("No probes found for " + arrayDesign);
        }
        mav.addObject("sequenceData", compositeSequenceSummary);
        mav.addObject("numCompositeSequences", compositeSequenceSummary.size());
    }
    mav.addObject("arrayDesign", arrayDesign);
    return mav;
}
Also used : ArrayDesign(ubic.gemma.model.expression.arrayDesign.ArrayDesign) ModelAndView(org.springframework.web.servlet.ModelAndView) CompositeSequenceMapValueObject(ubic.gemma.core.analysis.sequence.CompositeSequenceMapValueObject) EntityNotFoundException(ubic.gemma.web.util.EntityNotFoundException) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

RequestMapping (org.springframework.web.bind.annotation.RequestMapping)2 ModelAndView (org.springframework.web.servlet.ModelAndView)2 CompositeSequenceMapValueObject (ubic.gemma.core.analysis.sequence.CompositeSequenceMapValueObject)2 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)1 EntityNotFoundException (ubic.gemma.web.util.EntityNotFoundException)1