Class AbstractSingleFileInSeriesSingleCellDetector

java.lang.Object
ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleFileInSeriesSingleCellDetector
All Implemented Interfaces:
SingleCellDetector
Direct Known Subclasses:
AbstractSingleH5FileInSeriesSingleCellDetector, LoomSingleCellDetector

public abstract class AbstractSingleFileInSeriesSingleCellDetector extends AbstractSingleCellDetector
Handle detection and download of single-cell data from a single file in the supplementary materials of a GEO series.
Author:
poirigui
  • Constructor Details

    • AbstractSingleFileInSeriesSingleCellDetector

      protected AbstractSingleFileInSeriesSingleCellDetector(String name, String extension)
  • Method Details

    • accepts

      protected boolean accepts(String supplementaryFile)
      Indicate if the given supplementary file is accepted.

      The default implementation checks if the file ends with the extension (or the extension + .gz).

    • getDest

      protected Path getDest(GeoSeries series)
      Obtain the download destination for the single-cell data file.
    • hasSingleCellData

      public boolean hasSingleCellData(GeoSeries series)
      Description copied from interface: SingleCellDetector
      Indicate if the given GEO series has single cell data.
    • hasSingleCellData

      public boolean hasSingleCellData(GeoSample sample)
      Detection is not supported at the sample level.
    • downloadSingleCellData

      public Path downloadSingleCellData(GeoSeries series) throws NoSingleCellDataFoundException, IOException
      Download single-cell data for the given GEO series.
      Returns:
      a directory or file containing the downloaded series data
      Throws:
      IllegalArgumentException - if more than one matching file is present in the supplementary files of the series, use downloadSingleCellData(GeoSeries, String) as a workaround.
      NoSingleCellDataFoundException - if there is no single cell data for the given series
      IOException
    • downloadSingleCellData

      public Path downloadSingleCellData(GeoSeries series, String file) throws IOException
      Download a specific supplementary file at the series-level.
      Throws:
      IllegalArgumentException - if the supplementary file is not present in the series
      IOException
    • downloadSingleCellData

      public Path downloadSingleCellData(GeoSample sample) throws NoSingleCellDataFoundException
      Description copied from interface: SingleCellDetector
      Download single-cell data for the given GEO sample.
      Returns:
      a directory or file containing the downloaded sample data
      Throws:
      NoSingleCellDataFoundException - if there is no single cell data for the given sample
    • getAdditionalSupplementaryFiles

      public List<String> getAdditionalSupplementaryFiles(GeoSeries sample)
      Description copied from interface: SingleCellDetector
      Obtain a list of all additional supplementary files.
    • getAdditionalSupplementaryFiles

      public List<String> getAdditionalSupplementaryFiles(GeoSample sample)
      Description copied from interface: SingleCellDetector
      Obtain a list of all additional supplementary files.