use of ubic.gemma.core.loader.expression.geo.model.GeoPlatform in project Gemma by PavlidisLab.
the class GeoConverterTest method testWithImageNoGenbank.
/*
* Platform has IMAGE:CCCCC in CLONE_ID column, no genbank accessions anywhere.
*/
@Test
public final void testWithImageNoGenbank() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL222_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.setProcessPlatformsOnly(true);
parser.parse(is);
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL222");
Object result = this.gc.convert(platform);
ArrayDesign ad = (ArrayDesign) result;
for (CompositeSequence cs : ad.getCompositeSequences()) {
BioSequence bs = cs.getBiologicalCharacteristic();
assertTrue(bs.getName().startsWith("IMAGE"));
}
}
use of ubic.gemma.core.loader.expression.geo.model.GeoPlatform in project Gemma by PavlidisLab.
the class GeoConverterTest method testImageClones.
/*
* We should not longer use IMAGE:XXXXX as the sequence name.
*/
@Test
public void testImageClones() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL226_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL226");
Object result = this.gc.convert(platform);
ArrayDesign ad = (ArrayDesign) result;
assertNotNull(ad);
for (CompositeSequence cs : ad.getCompositeSequences()) {
BioSequence bs = cs.getBiologicalCharacteristic();
assertTrue("Got: " + bs.getName(), !bs.getName().startsWith("IMAGE") || bs.getSequenceDatabaseEntry() == null);
}
}
use of ubic.gemma.core.loader.expression.geo.model.GeoPlatform in project Gemma by PavlidisLab.
the class GeoConverterTest method testGPL6096ExonArray.
/*
* Should result in the rejection of 'irrelevant' probes.
*/
@Test
public void testGPL6096ExonArray() throws Exception {
GeoFamilyParser parser = new GeoFamilyParser();
parser.setProcessPlatformsOnly(true);
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL6096_family.soft.gz"))) {
parser.parse(is);
}
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL6096");
gc.setElementLimitForStrictness(500);
Object result = this.gc.convert(platform);
assertNotNull(result);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoPlatform in project Gemma by PavlidisLab.
the class GeoConverterTest method testWithImages.
/*
* Has image clones.
*/
@Test
public final void testWithImages() throws Exception {
GeoFamilyParser parser = new GeoFamilyParser();
parser.setProcessPlatformsOnly(true);
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL890_family.soft.gz"))) {
parser.parse(is);
}
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL890");
Object result = this.gc.convert(platform);
ArrayDesign ad = (ArrayDesign) result;
for (CompositeSequence cs : ad.getCompositeSequences()) {
BioSequence bs = cs.getBiologicalCharacteristic();
if (bs != null && bs.getSequence() != null) {
return;
}
}
fail("No sequences!");
}
use of ubic.gemma.core.loader.expression.geo.model.GeoPlatform in project Gemma by PavlidisLab.
the class GeoConverterTest method testMultipleTaxaIdentifiedBYAbbreviationsOnArrayWithOrganismColumn.
/*
* Method to test that an array design can have multiple taxa stored against it and that if abbreviations used as
* probe names mapped to the scientific names correctly if the abbreviation is stored in DB.
*/
@Test
public void testMultipleTaxaIdentifiedBYAbbreviationsOnArrayWithOrganismColumn() throws Exception {
Taxon rainbowTroat = taxonService.findByAbbreviation("omyk");
Taxon whiteFish = taxonService.findByAbbreviation("cclu");
Taxon rainbowSmelt = taxonService.findByAbbreviation("omor");
Taxon atlanticSalm = taxonService.findByAbbreviation("ssal");
assertNotNull(atlanticSalm);
// prototype bean.
gc = this.getBean(GeoConverter.class);
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GPL2899_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
// parse only the plaform
parser.setProcessPlatformsOnly(true);
parser.parse(is);
GeoPlatform platform = ((GeoParseResult) parser.getResults().iterator().next()).getPlatformMap().get("GPL2899");
Object result = gc.convert(platform);
ArrayDesign ad = (ArrayDesign) result;
assertNotNull(ad);
Set<Taxon> taxa = new HashSet<>();
BioSequence bs;
for (CompositeSequence cs : ad.getCompositeSequences()) {
bs = cs.getBiologicalCharacteristic();
if (bs != null) {
assertNotNull(bs.getTaxon());
taxa.add(bs.getTaxon());
}
}
assertEquals(4, taxa.size());
// original file has five taxa, test file just kept four.
assertTrue(taxa.contains(atlanticSalm));
assertTrue(taxa.contains(rainbowTroat));
assertTrue(taxa.contains(whiteFish));
assertTrue(taxa.contains(rainbowSmelt));
}
Aggregations