Class GeoServiceImpl
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, GeoService
- Author:
- pavlidis
-
Nested Class Summary
Nested classes/interfaces inherited from interface GeoService
GeoService.GeoUpdateConfig -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddElements(ArrayDesign targetPlatform) For the rare cases (Exon arrays) where we load the platform in two stages.voidCollection<?> convertAndPersist(Collection<? extends GeoData> parseResult, boolean doSampleMatching, boolean splitByPlatform, boolean allowSuperSeriesImport, boolean allowSubSeriesImport) Convert an already-fetched series and persist the resulting experiment(s).Collection<?> fetchAndLoad(String geoAccession, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform) See the 6-arg overload for why this isPropagation.NEVERand routes throughself.Collection<?> fetchAndLoad(String geoAccession, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform, boolean allowSuperSeriesImport, boolean allowSubSeriesImport) 🛑Propagation.NEVER:GeoDomainObjectGenerator.generate(String)downloads and parses the series' SOFT file over the network — 36 MB for one series the size of GSE1024, proportionally more for a bigger one — andhibernate.connection.handling_mode=DELAYED_ACQUISITION_AND_HOLDmeans a transaction open around that fetch pins a pooled connection for its entire duration without issuing a statement.Collection<?> loadFromSoftFile(String accession, String softFile, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform) SeefetchAndLoad(String, boolean, boolean, boolean)for why this isPropagation.NEVERand routes throughself.loadPlatforms(String geoAccession, Collection<? extends GeoData> platforms) Convert already-fetched platform data and persist the resulting array designs.voidvoidupdateFromGEO(String geoAccession, GeoService.GeoUpdateConfig geoUpdateConfig) Refetch and reprocess the GEO series, updating select information.voidupdateFromGEO(ExpressionExperiment ee, GeoService.GeoUpdateConfig geoUpdateConfig) Refetch and reprocess a given experiment.
-
Constructor Details
-
GeoServiceImpl
public GeoServiceImpl()
-
-
Method Details
-
afterPropertiesSet
-
addElements
Description copied from interface:GeoServiceFor the rare cases (Exon arrays) where we load the platform in two stages.- Specified by:
addElementsin interfaceGeoService- Parameters:
targetPlatform- already persistent array design.- Returns:
- updated (persistent) array design
-
fetchAndLoad
@Transactional(propagation=NEVER) @Nullable public Collection<?> fetchAndLoad(String geoAccession, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform) See the 6-arg overload for why this isPropagation.NEVERand routes throughself.- Specified by:
fetchAndLoadin interfaceGeoService- Parameters:
geoAccession- accessionloadPlatformOnly- load platforms onlydoSampleMatching- do sample matchingsplitByPlatform- split incompatible platforms- Returns:
- collection
-
fetchAndLoad
@Transactional(propagation=NEVER) @Nullable public Collection<?> fetchAndLoad(String geoAccession, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform, boolean allowSuperSeriesImport, boolean allowSubSeriesImport) 🛑Propagation.NEVER:GeoDomainObjectGenerator.generate(String)downloads and parses the series' SOFT file over the network — 36 MB for one series the size of GSE1024, proportionally more for a bigger one — andhibernate.connection.handling_mode=DELAYED_ACQUISITION_AND_HOLDmeans a transaction open around that fetch pins a pooled connection for its entire duration without issuing a statement. The blacklist/existence pre-checks above the fetch, and everything from conversion through the persist below it, are unchanged — each already runs as its own transaction (now reached throughself, since a self-invocation would not pass the proxy and this method no longer carries one of its own) or, for the pre-checks, through the callee's own.- Specified by:
fetchAndLoadin interfaceGeoService- Parameters:
geoAccession- accessionloadPlatformOnly- load platforms onlydoSampleMatching- do sample matchingsplitByPlatform- split incompatible platformsallowSuperSeriesImport- Allow loading if the Series is a SuperSeriesallowSubSeriesImport- Allow loading if the Series is a SubSeries- Returns:
- collection
-
loadPlatforms
@Transactional public Collection<ArrayDesign> loadPlatforms(String geoAccession, Collection<? extends GeoData> platforms) Description copied from interface:GeoServiceConvert already-fetched platform data and persist the resulting array designs.🛑 Not meant to be called directly — it exists so
GeoService.fetchAndLoad(String, boolean, boolean, boolean), which isPropagation.NEVERso the GEO fetch it wraps does not hold a transaction open, can reach a real transaction boundary through this bean's proxy for the persist step. A self-invocation would not open one.- Specified by:
loadPlatformsin interfaceGeoService
-
convertAndPersist
@Transactional @Nullable public Collection<?> convertAndPersist(Collection<? extends GeoData> parseResult, boolean doSampleMatching, boolean splitByPlatform, boolean allowSuperSeriesImport, boolean allowSubSeriesImport) Description copied from interface:GeoServiceConvert an already-fetched series and persist the resulting experiment(s).Same reason as
GeoService.loadPlatforms(String, Collection): reached through the proxy fromGeoService.fetchAndLoad(String, boolean, boolean, boolean)once the long GEO fetch has already returned, so the ACL-creating persist at the end of this call (and everything that validates/converts the series beforehand) runs in its own fresh transaction rather than the one the fetch would otherwise have held open.- Specified by:
convertAndPersistin interfaceGeoService
-
updateFromGEO
@Transactional public void updateFromGEO(String geoAccession, GeoService.GeoUpdateConfig geoUpdateConfig) Description copied from interface:GeoServiceRefetch and reprocess the GEO series, updating select information. Currently only implemented for experiments (GSEs)All experiments that uses the GEO accession will be updated as per
GeoService.updateFromGEO(ExpressionExperiment, GeoUpdateConfig).- Specified by:
updateFromGEOin interfaceGeoService
-
updateFromGEO
Description copied from interface:GeoServiceRefetch and reprocess a given experiment.- Specified by:
updateFromGEOin interfaceGeoService
-
loadFromSoftFile
@Transactional(propagation=NEVER) public Collection<?> loadFromSoftFile(String accession, String softFile, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform) SeefetchAndLoad(String, boolean, boolean, boolean)for why this isPropagation.NEVERand routes throughself.- Specified by:
loadFromSoftFilein interfaceGeoService- Parameters:
accession- e.g GSE1234softFile- the full path to the SOFT file. The file name has to be [accession].soft.gz- Returns:
- a single experiment.
-
setGeoDomainObjectGenerator
- Specified by:
setGeoDomainObjectGeneratorin interfaceGeoService
-