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;
}
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");
}
}
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;
}
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);
}
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);
}
Aggregations