@Test public void testFindGSECorrespondence() throws Exception { GeoFamilyParser parser = new GeoFamilyParser(); try (InputStream is = new GZIPInputStream( this.getClass().getResourceAsStream( "/data/loader/expression/geo/twoDatasets/GDS472.soft.gz" ) )) { parser.parse( is ); } try (InputStream is = new GZIPInputStream( this.getClass() .getResourceAsStream( "/data/loader/expression/geo/twoDatasets/GSE674_family.soft.gz" ) )) { parser.parse( is ); } try (InputStream is = new GZIPInputStream( this.getClass().getResourceAsStream( "/data/loader/expression/geo/twoDatasets/GDS473.soft.gz" ) )) { parser.parse( is ); } GeoParseResult parseResult = ( ( GeoParseResult ) parser.getResults().iterator().next() ); gds = parseResult.getDatasets().values(); assertEquals( 2, gds.size() ); DatasetCombiner datasetCombiner = new DatasetCombiner(); GeoSampleCorrespondence result = datasetCombiner.findGSECorrespondence( gds ); DatasetCombinerTest.log.debug( result ); assertEquals( 15, result.size() ); String[] keys = new String[] { "GSM10354", "GSM10355", "GSM10356", "GSM10359", "GSM10360", "GSM10361", "GSM10362", "GSM10363", "GSM10364", "GSM10365", "GSM10366", "GSM10367", "GSM10368", "GSM10369", "GSM10370", "GSM10374", "GSM10375", "GSM10376", "GSM10377", "GSM10378", "GSM10379", "GSM10380", "GSM10381", "GSM10382", "GSM10383", "GSM10384", "GSM10385", "GSM10386", "GSM10387", "GSM10388" }; for ( String string : keys ) { assertEquals( "Wrong result for " + string + ", expected 2", 2, result.getCorrespondingSamples( string ).size() ); } assertTrue( result.getCorrespondingSamples( "GSM10354" ).contains( "GSM10374" ) ); assertTrue( result.getCorrespondingSamples( "GSM10374" ).contains( "GSM10354" ) ); }
public GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ) { if ( dataSets == null ) return null; if ( dataSets.size() == 0 ) { throw new IllegalArgumentException( "No datasets!" ); } this.checkPlatformsMatchSeries( dataSets ); this.fillAccessionMaps( dataSets ); int numDatasets = dataSets.size(); return this.findCorrespondence( numDatasets ); }
DatasetCombiner { public GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ) { if ( dataSets == null ) return null; if ( dataSets.size() == 0 ) { throw new IllegalArgumentException( "No datasets!" ); } this.checkPlatformsMatchSeries( dataSets ); this.fillAccessionMaps( dataSets ); int numDatasets = dataSets.size(); return this.findCorrespondence( numDatasets ); } }
DatasetCombiner { public GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ) { if ( dataSets == null ) return null; if ( dataSets.size() == 0 ) { throw new IllegalArgumentException( "No datasets!" ); } this.checkPlatformsMatchSeries( dataSets ); this.fillAccessionMaps( dataSets ); int numDatasets = dataSets.size(); return this.findCorrespondence( numDatasets ); } DatasetCombiner();  DatasetCombiner( boolean doSampleMatching ); }
DatasetCombiner { public GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ) { if ( dataSets == null ) return null; if ( dataSets.size() == 0 ) { throw new IllegalArgumentException( "No datasets!" ); } this.checkPlatformsMatchSeries( dataSets ); this.fillAccessionMaps( dataSets ); int numDatasets = dataSets.size(); return this.findCorrespondence( numDatasets ); } DatasetCombiner();  DatasetCombiner( boolean doSampleMatching ); static Collection<String> findGDSforGSE( Collection<String> seriesAccessions ); static Collection<String> findGDSforGSE( String seriesAccession ); static Collection<String> findGSEforGDS( String datasetAccession ); static Map<GeoPlatform, List<GeoSample>> getPlatformSampleMap( GeoSeries geoSeries ); Collection<String> findGDSforGDS( String datasetAccession ); GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ); GeoSampleCorrespondence findGSECorrespondence( GeoSeries series ); }
DatasetCombiner { public GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ) { if ( dataSets == null ) return null; if ( dataSets.size() == 0 ) { throw new IllegalArgumentException( "No datasets!" ); } this.checkPlatformsMatchSeries( dataSets ); this.fillAccessionMaps( dataSets ); int numDatasets = dataSets.size(); return this.findCorrespondence( numDatasets ); } DatasetCombiner();  DatasetCombiner( boolean doSampleMatching ); static Collection<String> findGDSforGSE( Collection<String> seriesAccessions ); static Collection<String> findGDSforGSE( String seriesAccession ); static Collection<String> findGSEforGDS( String datasetAccession ); static Map<GeoPlatform, List<GeoSample>> getPlatformSampleMap( GeoSeries geoSeries ); Collection<String> findGDSforGDS( String datasetAccession ); GeoSampleCorrespondence findGSECorrespondence( Collection<GeoDataset> dataSets ); GeoSampleCorrespondence findGSECorrespondence( GeoSeries series );  }