use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class ExpressionExperimentBatchCorrectionServiceImpl method makeNewQuantitationType.
private QuantitationType makeNewQuantitationType(QuantitationType oldQt) {
QuantitationType newQt = QuantitationType.Factory.newInstance();
newQt.setIsBatchCorrected(true);
newQt.setDescription(oldQt.getDescription());
newQt.setIsBackground(oldQt.getIsBackground());
newQt.setIsBackgroundSubtracted(oldQt.getIsBackgroundSubtracted());
newQt.setGeneralType(oldQt.getGeneralType());
newQt.setIsMaskedPreferred(oldQt.getIsMaskedPreferred());
newQt.setIsPreferred(oldQt.getIsPreferred());
newQt.setIsRatio(oldQt.getIsRatio());
newQt.setScale(oldQt.getScale());
newQt.setIsNormalized(oldQt.getIsNormalized());
newQt.setRepresentation(oldQt.getRepresentation());
newQt.setName(oldQt.getName());
newQt.setType(oldQt.getType());
newQt.setIsRecomputedFromRawData(oldQt.getIsRecomputedFromRawData());
if (!newQt.getDescription().toLowerCase().contains(ExpressionExperimentBatchCorrectionServiceImpl.QT_DESCRIPTION_SUFFIX_FOR_BATCH_CORRECTED)) {
newQt.setDescription(newQt.getDescription() + " " + ExpressionExperimentBatchCorrectionServiceImpl.QT_DESCRIPTION_SUFFIX_FOR_BATCH_CORRECTED);
}
return newQt;
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE13657.
/*
* Left out quantitation types due to bug in how quantitation types were cached during persisting, if the QTs didn't
* have descriptions.
*/
@Test
public void testFetchAndLoadGSE13657() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
Collection<?> results = geoService.fetchAndLoad("GSE13657", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE13657 was already loaded - clean the DB before running the test");
return;
}
ee = this.eeService.thawLite(ee);
aclTestUtils.checkEEAcls(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(13, qts.size());
// make sure we got characteristics and treatments for both channels.
for (BioAssay ba : ee.getBioAssays()) {
BioMaterial bm = ba.getSampleUsed();
assertNotNull(bm);
log.info(bm + " " + bm.getDescription());
assertEquals(9, bm.getCharacteristics().size());
}
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE5949.
@Test
public void testFetchAndLoadGSE5949() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("GSE5949short")));
Collection<?> results = geoService.fetchAndLoad("GSE5949", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE5949 was already loaded - clean the DB before running the test");
return;
}
ee = this.eeService.thawLite(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(1, qts.size());
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE9048.
@Test
public void testFetchAndLoadGSE9048() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
Collection<?> results = geoService.fetchAndLoad("GSE9048", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE9048 was already loaded - clean the DB before running the test");
return;
}
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
aclTestUtils.checkEEAcls(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(16, qts.size());
twoChannelMissingValues.computeMissingValues(ee);
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
qts = eeService.getQuantitationTypes(ee);
// 16 that were imported plus the detection call we added.
assertEquals(17, qts.size());
Collection<ProcessedExpressionDataVector> dataVectors = processedExpressionDataVectorService.computeProcessedExpressionData(ee);
assertEquals(10, dataVectors.size());
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
qts = eeService.getQuantitationTypes(ee);
assertEquals(18, qts.size());
File f = dataFileService.writeOrLocateDataFile(ee, true, true);
assertTrue(f.canRead());
assertTrue(f.length() > 0);
}
use of ubic.gemma.model.common.quantitationtype.QuantitationType in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE18707.
/*
* For bug 2312 - qts getting dropped.
*/
@Test
public void testFetchAndLoadGSE18707() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
Collection<?> results = geoService.fetchAndLoad("GSE18707", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE18707 was already loaded - clean the DB before running the test");
return;
}
// Mouse430A_2.
ee = eeService.findByShortName("GSE18707");
aclTestUtils.checkEEAcls(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(1, qts.size());
QuantitationType qt = qts.iterator().next();
assertEquals("Processed Affymetrix Rosetta intensity values", qt.getDescription());
Collection<ProcessedExpressionDataVector> dataVectors = processedExpressionDataVectorService.computeProcessedExpressionData(ee);
assertEquals(100, dataVectors.size());
ee = eeService.findByShortName("GSE18707");
qts = eeService.getQuantitationTypes(ee);
assertEquals(2, qts.size());
}
Aggregations