Class MexDetector
- All Implemented Interfaces:
ArchiveBasedSingleCellDetector
,SeriesAwareSingleCellDetector
,SingleCellDetector
Older MEX datasets use the genes.tsv.gz
instead of features.tsv.gz
. Those are copied using the new
naming scheme into the download directory.
MEX data is only supported at the sample-level. However, we do support detecting its presence at the series-level, but not downloading.
- Author:
- poirigui
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
Fields inherited from class ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
log
Fields inherited from interface ubic.gemma.core.loader.expression.geo.singleCell.ArchiveBasedSingleCellDetector
DEFAULT_MAX_ENTRY_SIZE_IN_ARCHIVE_TO_SKIP, DEFAULT_MAX_NUMBER_OF_ENTRIES_TO_SKIP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondownloadSingleCellData
(GeoSample sample) Retrieve single-cell data for the given GEO sample to disk.downloadSingleCellData
(GeoSeries series) Download single-cell data for the given GEO series.downloadSingleCellData
(GeoSeries series, GeoSample sample) Download a GEO sample within the context of its series.Obtain a list of all additional supplementary files.Obtain a list of all additional supplementary files.getAdditionalSupplementaryFiles
(GeoSeries series, GeoSample sample) getSingleCellDataLoader
(GeoSeries series, SingleCellDataLoaderConfig config) Obtain a single cell data loader for the given GEO series based on previously downloading data.boolean
hasSingleCellData
(GeoSample sample) Indicate if the given GEO sample has single cell data.boolean
hasSingleCellData
(GeoSample sample, boolean allowArchiveLookup) Check if a GEO sample contains single-cell data.boolean
hasSingleCellData
(GeoSeries series) Indicate if the given GEO series has single cell data.boolean
hasSingleCellData
(GeoSeries series, GeoSample sample) Check if a sample contains single-cell data in the context of its series.void
setMaxEntrySizeInArchiveToSkip
(long maxEntrySizeInArchiveToSkip) Set the maximum size of an archive entry to skip the supplementary file altogether.void
setMaxNumberOfEntriesToSkip
(long maxNumberOfEntriesToSkip) Set the maximum number of archive entries to skip in order to ignore the supplementary file altogether.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
setDownloadDirectory, setRetryPolicy
-
Field Details
-
DEFAULT_BARCODES_FILE_SUFFIX
- See Also:
-
DEFAULT_BARCODE_METADATA_FILE_SUFFIX
- See Also:
-
DEFAULT_FEATURES_FILE_SUFFIX
- See Also:
-
DEFAULT_GENES_FILE_SUFFIX
- See Also:
-
DEFAULT_MATRIX_FILE_SUFFIX
- See Also:
-
-
Constructor Details
-
MexDetector
public MexDetector()
-
-
Method Details
-
setMaxEntrySizeInArchiveToSkip
public void setMaxEntrySizeInArchiveToSkip(long maxEntrySizeInArchiveToSkip) Description copied from interface:ArchiveBasedSingleCellDetector
Set the maximum size of an archive entry to skip the supplementary file altogether.Use -1 to indicate no limit.
Note that if a relevant file was previously found in the archive, it will not be skipped.
- Specified by:
setMaxEntrySizeInArchiveToSkip
in interfaceArchiveBasedSingleCellDetector
-
setMaxNumberOfEntriesToSkip
public void setMaxNumberOfEntriesToSkip(long maxNumberOfEntriesToSkip) Description copied from interface:ArchiveBasedSingleCellDetector
Set the maximum number of archive entries to skip in order to ignore the supplementary file altogether.Use -1 to indicate no limit.
Note that if a relevant file was previously found in the archive, it will not be ignored.
- Specified by:
setMaxNumberOfEntriesToSkip
in interfaceArchiveBasedSingleCellDetector
-
hasSingleCellData
Indicate if the given GEO series has single cell data.MEX data detection is not supported at the series level, so while this method can return true if barcodes/genes/matrices are present in the series supplementary files,
downloadSingleCellData(GeoSeries)
will subsequently fail.- Specified by:
hasSingleCellData
in interfaceSingleCellDetector
-
hasSingleCellData
Check if a sample contains single-cell data in the context of its series.- Specified by:
hasSingleCellData
in interfaceSeriesAwareSingleCellDetector
-
hasSingleCellData
Description copied from interface:SingleCellDetector
Indicate if the given GEO sample has single cell data.- Specified by:
hasSingleCellData
in interfaceSingleCellDetector
-
hasSingleCellData
Check if a GEO sample contains single-cell data.- Parameters:
allowArchiveLookup
- allow looking into archives for MEX files
-
downloadSingleCellData
Description copied from interface:SingleCellDetector
Download single-cell data for the given GEO series.- Specified by:
downloadSingleCellData
in interfaceSingleCellDetector
- Returns:
- a directory or file containing the downloaded series data
- Throws:
NoSingleCellDataFoundException
- if there is no single cell data for the given series
-
downloadSingleCellData
public Path downloadSingleCellData(GeoSeries series, GeoSample sample) throws NoSingleCellDataFoundException, IOException Download a GEO sample within the context of its series.This will first download the sample with
downloadSingleCellData(String, Collection)
with the merged supplementary files from the series and the sample, then create aseries/sample
folder structure and finally hard-link all the sample files in there. This ensures that if two series mention the same sample, they can reuse the same files.- Specified by:
downloadSingleCellData
in interfaceSeriesAwareSingleCellDetector
- Throws:
NoSingleCellDataFoundException
IOException
-
downloadSingleCellData
public Path downloadSingleCellData(GeoSample sample) throws NoSingleCellDataFoundException, IOException Retrieve single-cell data for the given GEO sample to disk.- Specified by:
downloadSingleCellData
in interfaceSingleCellDetector
- Returns:
- a directory or file containing the downloaded sample data
- Throws:
NoSingleCellDataFoundException
- if no single-cell data is found in the given GEO sampleIOException
-
getAdditionalSupplementaryFiles
Description copied from interface:SingleCellDetector
Obtain a list of all additional supplementary files.- Specified by:
getAdditionalSupplementaryFiles
in interfaceSingleCellDetector
-
getAdditionalSupplementaryFiles
Description copied from interface:SingleCellDetector
Obtain a list of all additional supplementary files.- Specified by:
getAdditionalSupplementaryFiles
in interfaceSingleCellDetector
-
getAdditionalSupplementaryFiles
- Specified by:
getAdditionalSupplementaryFiles
in interfaceSeriesAwareSingleCellDetector
-
getSingleCellDataLoader
public SingleCellDataLoader getSingleCellDataLoader(GeoSeries series, SingleCellDataLoaderConfig config) throws NoSingleCellDataFoundException Description copied from interface:SingleCellDetector
Obtain a single cell data loader for the given GEO series based on previously downloading data.- Specified by:
getSingleCellDataLoader
in interfaceSingleCellDetector
- Throws:
NoSingleCellDataFoundException
- if there is no single cell data for the given series
-