Interface CellXGeneDataLoaderService

All Known Implementing Classes:
CellXGeneDataLoaderServiceImpl

public interface CellXGeneDataLoaderService
High-level service for fetching and loading CELLxGENE datasets.
Author:
poirigui
  • Method Details

    • fetchAndLoad

      ExpressionExperiment fetchAndLoad(String collectionId, @Nullable String datasetId, @Nullable String assetId, ArrayDesign platform, String datasetShortName, boolean loadSingleCellData, boolean keepPooledSample, boolean keepUnknownSample, boolean dryRun) throws IOException
      Fetch a CELLxGENE dataset and load it into the database.
      Parameters:
      datasetId - CELLxGENE permanent dataset ID, dataset version ID or dataset title, or null if 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 identifier
      platform - 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 dataset
      loadSingleCellData - whether to load the single-cell data vectors, this can be done later if needed
      keepPooledSample - whether to keep the "pooled" sample
      keepUnknownSample - whether to keep the "unknown" sample
      Returns:
      a persistent ExpressionExperiment pre-populated with CELLxGENE metadata and single-cell data (if requested)
      Throws:
      IllegalArgumentException - if a dataset with the given short name already exists in the database, or if the platform taxon does not match that of the CELLxGENE dataset, or if the dataset cannot be resolved
      IOException
    • replaceVersionAccession

      DatabaseEntry replaceVersionAccession(ExpressionExperiment ee, String datasetId)
      Replace 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 DatabaseEntry is removed.

      Parameters:
      datasetId - the permanent CELLxGENE dataset ID that the current accession is a version of
      Returns:
      the new accession
      Throws:
      IllegalStateException - if the experiment does not have a CELLxGENE accession, or if that accession already has an accession version
    • setProgressReporterFactory

      void setProgressReporterFactory(ProgressReporterFactory progressReporterFactory)
      Set the progress reporter factory to use for reporting progress during data downloading.