use of ubic.gemma.core.loader.util.AlreadyExistsInSystemException in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE12135EXON.
@Test
public void testFetchAndLoadGSE12135EXON() throws Exception {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
try {
Collection<?> results = geoService.fetchAndLoad("GSE12135", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
aclTestUtils.checkEEAcls(ee);
} catch (AlreadyExistsInSystemException e) {
log.warn("Test skipped because GSE1133 was not removed from the system prior to test");
}
}
use of ubic.gemma.core.loader.util.AlreadyExistsInSystemException in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testLoadGSE28383ExonArray.
@Test
public void testLoadGSE28383ExonArray() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
Collection<?> results = geoService.fetchAndLoad("GSE28383", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE28383 was already loaded - clean the DB before running the test");
return;
}
ee = this.eeService.thawLite(ee);
/*
* Should load okay, even though it has no data. See bug 3981.
*/
try {
processedExpressionDataVectorService.computeProcessedExpressionData(ee);
fail("Should not have any data vectors for exon arrays on first loading");
} catch (Exception e) {
// OK
}
}
use of ubic.gemma.core.loader.util.AlreadyExistsInSystemException in project Gemma by PavlidisLab.
the class BatchInfoPopulationServiceIntegrationTest method testLoadCommandConsoleFormat.
/*
* Another Affymetrix format - GCOS
*/
@Test
public void testLoadCommandConsoleFormat() throws Exception {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
ExpressionExperiment newee;
try {
Collection<?> results = geoService.fetchAndLoad("GSE20219", false, true, false);
newee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
newee = (ExpressionExperiment) ((List<?>) e.getData()).iterator().next();
}
assertNotNull(newee);
newee = eeService.thawLite(newee);
assertTrue(batchInfoPopulationService.fillBatchInformation(newee, true));
newee = eeService.thawLite(newee);
for (ExperimentalFactor ef : newee.getExperimentalDesign().getExperimentalFactors()) {
if (ef.getName().equals(ExperimentalFactorService.BATCH_FACTOR_NAME)) {
for (FactorValue fv : ef.getFactorValues()) {
assertNotNull(fv.getValue());
// Batch_01, Batch_02 etc.
assertTrue(fv.getValue().startsWith("Batch_0"));
}
}
}
}
use of ubic.gemma.core.loader.util.AlreadyExistsInSystemException in project Gemma by PavlidisLab.
the class DiffExWithInvalidInteractionTest method setup.
@Before
public void setup() throws Exception {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(FileTools.resourceToPath("/data/analysis/expression")));
try {
Collection<?> results = geoService.fetchAndLoad("GSE50664", 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/8165_GSE50664_expdesign.data.txt"));
}
use of ubic.gemma.core.loader.util.AlreadyExistsInSystemException in project Gemma by PavlidisLab.
the class ContinuousVariableDiffExTest method setup.
@Before
public void setup() throws Exception {
/*
* this is an exon array data set that has the data present. It's an annoying choice for a test in that it
* exposes issues with our attempts to ignore the data from exon arrays until we get it from the raw CEL files.
*/
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(FileTools.resourceToPath("/data/analysis/expression/gse13949short")));
try {
Collection<?> results = geoService.fetchAndLoad("GSE13949", 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/gse13949short/1151_GSE13949_expdesign.data.txt"));
}
Aggregations