Class MexDetector
- java.lang.Object
-
- ubic.gemma.core.loader.expression.geo.singleCell.AbstractSingleCellDetector
-
- ubic.gemma.core.loader.expression.geo.singleCell.MexDetector
-
- All Implemented Interfaces:
ArchiveBasedSingleCellDetector
,SeriesAwareSingleCellDetector
,SingleCellDetector
public class MexDetector extends AbstractSingleCellDetector implements ArchiveBasedSingleCellDetector, SeriesAwareSingleCellDetector
Detects 10X MEX data from GEO series and samples.Older MEX datasets use the
genes.tsv.gz
instead offeatures.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
Fields Modifier and Type Field Description static String
DEFAULT_BARCODE_METADATA_FILE_SUFFIX
static String
DEFAULT_BARCODES_FILE_SUFFIX
static String
DEFAULT_FEATURES_FILE_SUFFIX
static String
DEFAULT_GENES_FILE_SUFFIX
static String
DEFAULT_MATRIX_FILE_SUFFIX
-
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 Constructor Description MexDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
downloadSingleCellData(GeoSample sample)
Retrieve single-cell data for the given GEO sample to disk.Path
downloadSingleCellData(GeoSeries series)
Download single-cell data for the given GEO series.Path
downloadSingleCellData(GeoSeries series, GeoSample sample)
Download a GEO sample within the context of its series.List<String>
getAdditionalSupplementaryFiles(GeoSample sample)
Obtain a list of all additional supplementary files.List<String>
getAdditionalSupplementaryFiles(GeoSeries series)
Obtain a list of all additional supplementary files.List<String>
getAdditionalSupplementaryFiles(GeoSeries series, GeoSample sample)
SingleCellDataLoader
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 Detail
-
DEFAULT_BARCODES_FILE_SUFFIX
public static final String DEFAULT_BARCODES_FILE_SUFFIX
- See Also:
- Constant Field Values
-
DEFAULT_BARCODE_METADATA_FILE_SUFFIX
public static final String DEFAULT_BARCODE_METADATA_FILE_SUFFIX
- See Also:
- Constant Field Values
-
DEFAULT_FEATURES_FILE_SUFFIX
public static final String DEFAULT_FEATURES_FILE_SUFFIX
- See Also:
- Constant Field Values
-
DEFAULT_GENES_FILE_SUFFIX
public static final String DEFAULT_GENES_FILE_SUFFIX
- See Also:
- Constant Field Values
-
DEFAULT_MATRIX_FILE_SUFFIX
public static final String DEFAULT_MATRIX_FILE_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public boolean hasSingleCellData(GeoSeries series)
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
public boolean hasSingleCellData(GeoSeries series, GeoSample sample)
Check if a sample contains single-cell data in the context of its series.- Specified by:
hasSingleCellData
in interfaceSeriesAwareSingleCellDetector
-
hasSingleCellData
public boolean hasSingleCellData(GeoSample sample)
Description copied from interface:SingleCellDetector
Indicate if the given GEO sample has single cell data.- Specified by:
hasSingleCellData
in interfaceSingleCellDetector
-
hasSingleCellData
public boolean hasSingleCellData(GeoSample sample, boolean allowArchiveLookup)
Check if a GEO sample contains single-cell data.- Parameters:
allowArchiveLookup
- allow looking into archives for MEX files
-
downloadSingleCellData
public Path downloadSingleCellData(GeoSeries series) throws NoSingleCellDataFoundException
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
public List<String> getAdditionalSupplementaryFiles(GeoSeries series)
Description copied from interface:SingleCellDetector
Obtain a list of all additional supplementary files.- Specified by:
getAdditionalSupplementaryFiles
in interfaceSingleCellDetector
-
getAdditionalSupplementaryFiles
public List<String> getAdditionalSupplementaryFiles(GeoSample sample)
Description copied from interface:SingleCellDetector
Obtain a list of all additional supplementary files.- Specified by:
getAdditionalSupplementaryFiles
in interfaceSingleCellDetector
-
getAdditionalSupplementaryFiles
public List<String> getAdditionalSupplementaryFiles(GeoSeries series, GeoSample sample)
- 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
-
-