Search in sources :

Example 1 with RawExpressionDataVectorService

use of ubic.gemma.persistence.service.expression.bioAssayData.RawExpressionDataVectorService in project Gemma by PavlidisLab.

the class DesignElementDataVectorServiceTest method testFindByQt.

@Test
public void testFindByQt() throws Exception {
    try {
        geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("gse432Short")));
        Collection<?> results = geoService.fetchAndLoad("GSE432", false, true, false);
        newee = (ExpressionExperiment) results.iterator().next();
    } catch (AlreadyExistsInSystemException e) {
        newee = (ExpressionExperiment) e.getData();
    }
    newee.setShortName(RandomStringUtils.randomAlphabetic(12));
    expressionExperimentService.update(newee);
    newee = this.expressionExperimentService.thawLite(newee);
    RawExpressionDataVectorService rawService = this.getBean(RawExpressionDataVectorService.class);
    QuantitationType qt = null;
    for (QuantitationType q : newee.getQuantitationTypes()) {
        if (q.getIsPreferred()) {
            qt = q;
            break;
        }
    }
    assertNotNull("QT is null", qt);
    Collection<? extends DesignElementDataVector> preferredVectors = rawService.findRawAndProcessed(qt);
    assertNotNull(preferredVectors);
    assertEquals(40, preferredVectors.size());
}
Also used : RawExpressionDataVectorService(ubic.gemma.persistence.service.expression.bioAssayData.RawExpressionDataVectorService) AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) QuantitationType(ubic.gemma.model.common.quantitationtype.QuantitationType) ExpressionExperiment(ubic.gemma.model.expression.experiment.ExpressionExperiment) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) AbstractGeoServiceTest(ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 AbstractGeoServiceTest (ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest)1 GeoDomainObjectGeneratorLocal (ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal)1 AlreadyExistsInSystemException (ubic.gemma.core.loader.util.AlreadyExistsInSystemException)1 QuantitationType (ubic.gemma.model.common.quantitationtype.QuantitationType)1 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)1 RawExpressionDataVectorService (ubic.gemma.persistence.service.expression.bioAssayData.RawExpressionDataVectorService)1