use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class BaselineDetectionTest method setUp.
@Before
public void setUp() throws Exception {
String path = FileTools.resourceToPath("/data/loader/expression/geo/gse18162Short");
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(path));
Collection<?> results = geoService.fetchAndLoad("GSE18162", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
// OK.
if (e.getData() instanceof List) {
ee = (ExpressionExperiment) ((List<?>) e.getData()).iterator().next();
} else {
ee = (ExpressionExperiment) e.getData();
}
}
ee = this.eeService.thawLite(ee);
if (ee.getExperimentalDesign().getExperimentalFactors().isEmpty()) {
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
try (InputStream is = this.getClass().getResourceAsStream("/data/loader/expression/geo/gse18162Short/design.txt")) {
experimentalDesignImporter.importDesign(ee, is);
}
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
}
// end setup
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class DiffExMetaAnalyzerServiceTest method loadSet.
private void loadSet(String acc) throws Exception {
String path = new File(this.getClass().getResource("/data/loader/expression/geo/meta-analysis").toURI()).getAbsolutePath();
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(path));
try {
geoService.fetchAndLoad(acc, false, true, false);
} catch (AlreadyExistsInSystemException ignored) {
log.info("Set already exists in system.");
}
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class DiffExWithInvalidInteraction2Test method setup.
@Before
public void setup() throws Exception {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(FileTools.resourceToPath("/data/analysis/expression")));
try {
Collection<?> results = geoService.fetchAndLoad("GSE37301", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
ee = (ExpressionExperiment) ((Collection<?>) e.getData()).iterator().next();
}
ee = expressionExperimentService.thawLite(ee);
Collection<ExperimentalFactor> toremove = new HashSet<>(ee.getExperimentalDesign().getExperimentalFactors());
for (ExperimentalFactor ef : toremove) {
experimentalFactorService.delete(ef);
ee.getExperimentalDesign().getExperimentalFactors().remove(ef);
}
expressionExperimentService.update(ee);
processedExpressionDataVectorService.computeProcessedExpressionData(ee);
ee = expressionExperimentService.thaw(ee);
designImporter.importDesign(ee, this.getClass().getResourceAsStream("/data/analysis/expression/7737_GSE37301_expdesign.data.txt"));
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class SVDServiceImplTest method testsvd.
@Test
public void testsvd() throws Exception {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("shortTest")));
// also used in the GeoDatasetServiceIntegrationTest.
try {
Collection<?> results = geoService.fetchAndLoad("GSE674", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
ee = (ExpressionExperiment) ((Collection<?>) e.getData()).iterator().next();
}
assertNotNull(ee);
ee = eeService.thaw(ee);
processedExpressionDataVectorService.createProcessedDataVectors(ee);
ee = eeService.findByShortName("GSE674");
assertNotNull(ee);
SVDValueObject svd = svdService.svd(ee.getId());
assertNotNull(svd);
assertNotNull(svd.getvMatrix());
assertEquals(5, svd.getFactorCorrelations().size());
analysisUtilService.deleteOldAnalyses(ee);
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class CompositeSequenceGeneMapperServiceTest method setup.
@Before
public void setup() throws Exception {
this.cleanup();
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("platform")));
@SuppressWarnings("unchecked") final Collection<ArrayDesign> ads = (Collection<ArrayDesign>) geoService.fetchAndLoad(arrayAccession, true, true, false);
ad = ads.iterator().next();
ad = arrayDesignService.thaw(ad);
this.loadData();
}
Aggregations