Search in sources :

Example 11 with ExpressionExperimentValueObject

use of ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject in project Gemma by PavlidisLab.

the class BatchInfoPopulationServiceImpl method needToRun.

/**
 * @param ee ee
 * @return true if it needs processing
 */
private boolean needToRun(ExpressionExperiment ee) {
    ExpressionExperimentValueObject eevo = expressionExperimentService.loadValueObject(ee);
    assert eevo != null;
    if (StringUtils.isBlank(eevo.getAccession())) {
        BatchInfoPopulationServiceImpl.log.info(ee + " lacks an external accession to use for fetching, will not attempt to fetch raw data files.");
        return false;
    }
    if (eevo.getTechnologyType().equals("NONE")) {
        BatchInfoPopulationServiceImpl.log.info(ee + " has technology type 'NONE', will not attempt to fetch raw data files");
        return false;
    }
    AuditEvent e = auditEventService.getLastEvent(ee, BatchInformationFetchingEvent.class);
    if (e == null)
        return true;
    if (FailedBatchInformationFetchingEvent.class.isAssignableFrom(e.getClass()))
        // worth trying
        return true;
    // on occasions the files appear or were missed the first time ...? GSE20842
    if (FailedBatchInformationMissingEvent.class.isAssignableFrom(e.getClass())) {
        RawDataFetcher fetcher = new RawDataFetcher();
        return fetcher.checkForFile(ee.getAccession().getAccession());
    }
    // already did it.
    return false;
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) AuditEvent(ubic.gemma.model.common.auditAndSecurity.AuditEvent) RawDataFetcher(ubic.gemma.core.loader.expression.geo.fetcher.RawDataFetcher)

Example 12 with ExpressionExperimentValueObject

use of ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject in project Gemma by PavlidisLab.

the class ExpressionExperimentReportServiceImpl method populateReportInformation.

@Override
public void populateReportInformation(Collection<ExpressionExperimentDetailsValueObject> vos) {
    StopWatch timer = new StopWatch();
    timer.start();
    List<Long> ids = new ArrayList<>();
    for (ExpressionExperimentValueObject vo : vos) {
        ids.add(vo.getId());
    }
    Collection<ExpressionExperimentDetailsValueObject> cachedVos = this.retrieveSummaryObjects(ids);
    Map<Long, ExpressionExperimentDetailsValueObject> id2cachedVo = EntityUtils.getIdMap(cachedVos);
    for (ExpressionExperimentDetailsValueObject eeVo : vos) {
        ExpressionExperimentDetailsValueObject cacheVo = id2cachedVo.get(eeVo.getId());
        if (cacheVo != null) {
            eeVo.setBioMaterialCount(cacheVo.getBioMaterialCount());
            eeVo.setProcessedExpressionVectorCount(cacheVo.getProcessedExpressionVectorCount());
            eeVo.setCoexpressionLinkCount(cacheVo.getCoexpressionLinkCount());
            eeVo.setDateCached(cacheVo.getDateCached());
            eeVo.setDifferentialExpressionAnalyses(cacheVo.getDifferentialExpressionAnalyses());
            eeVo.setLastUpdated(cacheVo.getLastUpdated());
        }
    }
    timer.stop();
    if (timer.getTime() > 1000) {
        log.info(vos.size() + " EE reports fetched in " + timer.getTime() + "ms");
    }
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) ExpressionExperimentDetailsValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentDetailsValueObject) StopWatch(org.apache.commons.lang3.time.StopWatch)

Example 13 with ExpressionExperimentValueObject

use of ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject in project Gemma by PavlidisLab.

the class ExpressionExperimentReportServiceImpl method generateSummaryObjects.

private Collection<ExpressionExperimentDetailsValueObject> generateSummaryObjects(Collection<Long> ids) {
    Collection<ExpressionExperimentDetailsValueObject> vos = expressionExperimentService.loadDetailsValueObjects(null, false, ids, null, 0, 0);
    this.getStats(vos);
    for (ExpressionExperimentValueObject vo : vos) {
        this.evictFromCache(vo.getId());
        statsCache.put(new Element(vo.getId(), vo));
    }
    return vos;
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) Element(net.sf.ehcache.Element) ExpressionExperimentDetailsValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentDetailsValueObject)

Example 14 with ExpressionExperimentValueObject

use of ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject in project Gemma by PavlidisLab.

the class BibRefControllerTest method testShowAllForExperiments.

@Test
public void testShowAllForExperiments() {
    ModelAndView mv = brc.showAllForExperiments(this.newGet("/bibRef/showAllEeBibRefs.html"), (HttpServletResponse) null);
    @SuppressWarnings("unchecked") Map<CitationValueObject, Collection<ExpressionExperimentValueObject>> citationToEEs = (Map<CitationValueObject, Collection<ExpressionExperimentValueObject>>) mv.getModel().get("citationToEEs");
    assertNotNull(citationToEEs);
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) CitationValueObject(ubic.gemma.model.common.description.CitationValueObject) ModelAndView(org.springframework.web.servlet.ModelAndView) Collection(java.util.Collection) Map(java.util.Map) Test(org.junit.Test) BaseSpringWebTest(ubic.gemma.web.util.BaseSpringWebTest)

Example 15 with ExpressionExperimentValueObject

use of ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject in project Gemma by PavlidisLab.

the class DatasetsRestTest method testSome.

@Test
public void testSome() {
    ResponseDataObject response = datasetsWebService.datasets(ArrayDatasetArg.valueOf(DatasetsRestTest.ees.get(0).getShortName() + ", BAD_NAME, " + DatasetsRestTest.ees.get(2).getShortName()), DatasetFilterArg.valueOf(""), IntArg.valueOf("0"), IntArg.valueOf("10"), SortArg.valueOf("+id"), new MockHttpServletResponse());
    assertNotNull(response.getData());
    assertTrue(response.getData() instanceof Collection<?>);
    assertEquals(2, ((Collection) response.getData()).size());
    assertTrue(((Collection) response.getData()).iterator().next() instanceof ExpressionExperimentValueObject);
}
Also used : ExpressionExperimentValueObject(ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject) ResponseDataObject(ubic.gemma.web.services.rest.util.ResponseDataObject) MockHttpServletResponse(org.springframework.mock.web.MockHttpServletResponse) Test(org.junit.Test) BaseSpringWebTest(ubic.gemma.web.util.BaseSpringWebTest)

Aggregations

ExpressionExperimentValueObject (ubic.gemma.model.expression.experiment.ExpressionExperimentValueObject)21 StopWatch (org.apache.commons.lang3.time.StopWatch)4 Test (org.junit.Test)4 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)4 Taxon (ubic.gemma.model.genome.Taxon)4 BaseSpringWebTest (ubic.gemma.web.util.BaseSpringWebTest)4 ModelAndView (org.springframework.web.servlet.ModelAndView)3 SearchResult (ubic.gemma.core.search.SearchResult)3 ExpressionExperimentSet (ubic.gemma.model.analysis.expression.ExpressionExperimentSet)3 ExpressionExperimentDetailsValueObject (ubic.gemma.model.expression.experiment.ExpressionExperimentDetailsValueObject)3 Gene (ubic.gemma.model.genome.Gene)3 MockHttpServletResponse (org.springframework.mock.web.MockHttpServletResponse)2 SearchResultDisplayObject (ubic.gemma.core.search.SearchResultDisplayObject)2 BibliographicReference (ubic.gemma.model.common.description.BibliographicReference)2 CitationValueObject (ubic.gemma.model.common.description.CitationValueObject)2 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)2 ArrayDesignValueObject (ubic.gemma.model.expression.arrayDesign.ArrayDesignValueObject)2 BioAssayDimension (ubic.gemma.model.expression.bioAssayData.BioAssayDimension)2 CompositeSequence (ubic.gemma.model.expression.designElement.CompositeSequence)2 BioAssaySet (ubic.gemma.model.expression.experiment.BioAssaySet)2