Class CellXGeneDataLoaderServiceImpl
java.lang.Object
ubic.gemma.core.loader.expression.cellxgene.CellXGeneDataLoaderServiceImpl
- All Implemented Interfaces:
CellXGeneDataLoaderService
@Service
@Transactional(propagation=NEVER)
public class CellXGeneDataLoaderServiceImpl
extends Object
implements CellXGeneDataLoaderService
- Author:
- poirigui
-
Constructor Summary
ConstructorsConstructorDescriptionCellXGeneDataLoaderServiceImpl(Persister persister, ArrayDesignService arrayDesignService, ExpressionExperimentService expressionExperimentService, SingleCellExpressionExperimentService singleCellExpressionExperimentService, ExternalDatabaseService externalDatabaseService, DatabaseEntryService databaseEntryService, TaxonReadService taxonReadService, SingleCellDataTransformationFactory singleCellDataTransformationFactory, org.springframework.transaction.PlatformTransactionManager transactionManager, Path cellXGeneDownloadPath, Path cellXGeneTransposedPath, String ncbiApiKey) -
Method Summary
Modifier and TypeMethodDescriptionfetchAndLoad(String collectionId, String datasetId, String assetId, ArrayDesign platform, String datasetShortName, boolean loadSingleCellData, boolean keepPooledSample, boolean keepUnknownSample, boolean dryRun) Fetch a CELLxGENE dataset and load it into the database.replaceVersionAccession(ExpressionExperiment ee, String datasetId) Replace a CELLxGENE accession that holds a dataset version ID by one that holds the permanent dataset ID.voidsetProgressReporterFactory(ProgressReporterFactory progressReporterFactory) Set the progress reporter factory to use for reporting progress during data downloading.
-
Constructor Details
-
CellXGeneDataLoaderServiceImpl
@Autowired public CellXGeneDataLoaderServiceImpl(Persister persister, ArrayDesignService arrayDesignService, ExpressionExperimentService expressionExperimentService, SingleCellExpressionExperimentService singleCellExpressionExperimentService, ExternalDatabaseService externalDatabaseService, DatabaseEntryService databaseEntryService, TaxonReadService taxonReadService, SingleCellDataTransformationFactory singleCellDataTransformationFactory, org.springframework.transaction.PlatformTransactionManager transactionManager, @Value("${cellxgene.local.singleCellData.basepath}") Path cellXGeneDownloadPath, @Value("${gemma.download.path}/singleCellData/CELLxGENE_Transposed") Path cellXGeneTransposedPath, @Value("${entrez.efetch.apikey}") String ncbiApiKey)
-
-
Method Details
-
fetchAndLoad
public ExpressionExperiment fetchAndLoad(String collectionId, @Nullable String datasetId, @Nullable String assetId, ArrayDesign platform, String datasetShortName, boolean loadSingleCellData, boolean keepPooledSample, boolean keepUnknownSample, boolean dryRun) throws IOException Description copied from interface:CellXGeneDataLoaderServiceFetch a CELLxGENE dataset and load it into the database.- Specified by:
fetchAndLoadin interfaceCellXGeneDataLoaderService- Parameters:
datasetId- CELLxGENE permanent dataset ID, dataset version ID or dataset title, ornullif the collection holds a single dataset. The resulting accession records the permanent ID, with the version ID as its accession version.assetId- CELLxGENE dataset asset identifierplatform- platform to use for mapping design elements from the data, the primary taxon must correspond to that of the dataset.datasetShortName- short name to use for the resulting datasetloadSingleCellData- whether to load the single-cell data vectors, this can be done later if neededkeepPooledSample- whether to keep the "pooled" samplekeepUnknownSample- whether to keep the "unknown" sample- Returns:
- a persistent
ExpressionExperimentpre-populated with CELLxGENE metadata and single-cell data (if requested) - Throws:
IOException
-
replaceVersionAccession
@Transactional @Audited(value=CommentedEvent.class, messageSpel="'Replaced the CELLxGENE accession ' + #result.accessionVersion + ' (a dataset version ID) by the permanent dataset ID ' + #datasetId + ', keeping ' + #result.accessionVersion + ' as its accession version.'") public DatabaseEntry replaceVersionAccession(ExpressionExperiment ee, String datasetId) Description copied from interface:CellXGeneDataLoaderServiceReplace a CELLxGENE accession that holds a dataset version ID by one that holds the permanent dataset ID.Datasets loaded before permanent IDs were recorded store the version ID as their accession. The new accession keeps that version ID as its accession version, since it designates the data that was actually loaded, and keeps the same URI. The previous
DatabaseEntryis removed.- Specified by:
replaceVersionAccessionin interfaceCellXGeneDataLoaderService- Parameters:
datasetId- the permanent CELLxGENE dataset ID that the current accession is a version of- Returns:
- the new accession
-
setProgressReporterFactory
Description copied from interface:CellXGeneDataLoaderServiceSet the progress reporter factory to use for reporting progress during data downloading.- Specified by:
setProgressReporterFactoryin interfaceCellXGeneDataLoaderService
-