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
-
-
Field Summary
-
Fields inherited from class ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
log
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractSingleFileInSeriesSingleCellDetector(String name, String extension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
accepts(String supplementaryFile)
Indicate if the given supplementary file is accepted.Path
downloadSingleCellData(GeoSample sample)
Download single-cell data for the given GEO sample.Path
downloadSingleCellData(GeoSeries series)
Download single-cell data for the given GEO series.Path
downloadSingleCellData(GeoSeries series, String file)
Download a specific supplementary file at the series-level.List<String>
getAdditionalSupplementaryFiles(GeoSample sample)
Obtain a list of all additional supplementary files.List<String>
getAdditionalSupplementaryFiles(GeoSeries sample)
Obtain a list of all additional supplementary files.protected Path
getDest(GeoSeries series)
Obtain the download destination for the single-cell data file.boolean
hasSingleCellData(GeoSample sample)
Detection is not supported at the sample level.boolean
hasSingleCellData(GeoSeries series)
Indicate if the given GEO series has single cell data.-
Methods inherited from class ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
existsAndHasExpectedSize, getDownloadDirectory, getSizeInBytes, openSupplementaryFileAsStream, retry, setDownloadDirectory, setFTPClientFactory, setRetryPolicy
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.core.loader.expression.geo.singleCell.SingleCellDetector
getSingleCellDataLoader
-
-
-
-
Method Detail
-
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, usedownloadSingleCellData(GeoSeries, String)
as a workaround.NoSingleCellDataFoundException
- if there is no single cell data for the given seriesIOException
-
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 seriesIOException
-
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.
-
-