Class GeoServiceImpl

java.lang.Object
ubic.gemma.core.loader.expression.geo.service.GeoServiceImpl
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, GeoService

@Component public class GeoServiceImpl extends Object implements GeoService, org.springframework.beans.factory.InitializingBean
Non-interactive fetching, processing and persisting of GEO data.
Author:
pavlidis
  • Constructor Details

    • GeoServiceImpl

      public GeoServiceImpl()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • addElements

      @Transactional public ArrayDesign addElements(ArrayDesign targetPlatform)
      Description copied from interface: GeoService
      For the rare cases (Exon arrays) where we load the platform in two stages.
      Specified by:
      addElements in interface GeoService
      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 is Propagation.NEVER and routes through self.
      Specified by:
      fetchAndLoad in interface GeoService
      Parameters:
      geoAccession - accession
      loadPlatformOnly - load platforms only
      doSampleMatching - do sample matching
      splitByPlatform - 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 — and hibernate.connection.handling_mode=DELAYED_ACQUISITION_AND_HOLD means 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 through self, 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:
      fetchAndLoad in interface GeoService
      Parameters:
      geoAccession - accession
      loadPlatformOnly - load platforms only
      doSampleMatching - do sample matching
      splitByPlatform - split incompatible platforms
      allowSuperSeriesImport - Allow loading if the Series is a SuperSeries
      allowSubSeriesImport - 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: GeoService
      Convert 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 is Propagation.NEVER so 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:
      loadPlatforms in interface GeoService
    • convertAndPersist

      @Transactional @Nullable public Collection<?> convertAndPersist(Collection<? extends GeoData> parseResult, boolean doSampleMatching, boolean splitByPlatform, boolean allowSuperSeriesImport, boolean allowSubSeriesImport)
      Description copied from interface: GeoService
      Convert an already-fetched series and persist the resulting experiment(s).

      Same reason as GeoService.loadPlatforms(String, Collection): reached through the proxy from GeoService.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:
      convertAndPersist in interface GeoService
    • updateFromGEO

      @Transactional public void updateFromGEO(String geoAccession, GeoService.GeoUpdateConfig geoUpdateConfig)
      Description copied from interface: GeoService
      Refetch 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:
      updateFromGEO in interface GeoService
    • updateFromGEO

      public void updateFromGEO(ExpressionExperiment ee, GeoService.GeoUpdateConfig geoUpdateConfig)
      Description copied from interface: GeoService
      Refetch and reprocess a given experiment.
      Specified by:
      updateFromGEO in interface GeoService
    • loadFromSoftFile

      @Transactional(propagation=NEVER) public Collection<?> loadFromSoftFile(String accession, String softFile, boolean loadPlatformOnly, boolean doSampleMatching, boolean splitByPlatform)
      See fetchAndLoad(String, boolean, boolean, boolean) for why this is Propagation.NEVER and routes through self.
      Specified by:
      loadFromSoftFile in interface GeoService
      Parameters:
      accession - e.g GSE1234
      softFile - the full path to the SOFT file. The file name has to be [accession].soft.gz
      Returns:
      a single experiment.
    • setGeoDomainObjectGenerator

      public void setGeoDomainObjectGenerator(GeoDomainObjectGenerator generator)
      Specified by:
      setGeoDomainObjectGenerator in interface GeoService