Class SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C extends SingleCellDataLoaderConfig,B extends SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C,B>>

Direct Known Subclasses:
AnnDataSingleCellDataLoaderConfig.AnnDataSingleCellDataLoaderConfigBuilder, MexSingleCellDataLoaderConfig.MexSingleCellDataLoaderConfigBuilder
Enclosing class:
SingleCellDataLoaderConfig

public abstract static class SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C extends SingleCellDataLoaderConfig,B extends SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C,B>> extends SequencingDataLoaderConfig.SequencingDataLoaderConfigBuilder<C,B>
  • Constructor Details

    • SingleCellDataLoaderConfigBuilder

      public SingleCellDataLoaderConfigBuilder()
  • Method Details

    • ignoreSamplesLackingData

      public B ignoreSamplesLackingData(boolean ignoreSamplesLackingData)
      Ignore individual samples that lack or have incomplete data.

      This is only implemented for MEX.

      Returns:
      this.
    • cellTypeAssignmentFile

      public B cellTypeAssignmentFile(@Nullable Path cellTypeAssignmentFile)
      A location where cell type can be found in a format covered by GenericMetadataSingleCellDataLoader.

      If null, no cell type assignment will be imported. However, the loader might have other provisions for loading cell types. For example, AnnDataSingleCellDataLoader can import cell types using a factor name.

      Returns:
      this.
    • cellTypeAssignmentName

      public B cellTypeAssignmentName(@Nullable String cellTypeAssignmentName)
      A name to use for the cell type assignment.

      If null, it is left to the specific loader to decide the name.

      Returns:
      this.
    • cellTypeAssignmentDescription

      public B cellTypeAssignmentDescription(@Nullable String cellTypeAssignmentDescription)
      A description to use for the cell type assignment.
      Returns:
      this.
    • cellTypeAssignmentProtocol

      public B cellTypeAssignmentProtocol(@Nullable Protocol cellTypeAssignmentProtocol)
      A protocol to use for the cell type assignment.

      If non-null, this must be persistent.

      Returns:
      this.
    • replaceExistingCellTypeAssignment

      public B replaceExistingCellTypeAssignment(boolean replaceExistingCellTypeAssignment)
      If there is already a cell type assignment with the same name, replace it with the new one.

      Note that CTAs with a null name cannot be replaced.

      Returns:
      this.
    • otherCellLevelCharacteristicsFile

      public B otherCellLevelCharacteristicsFile(@Nullable Path otherCellLevelCharacteristicsFile)
      A location where additional cell-level characteristics can be loaded.
      Returns:
      this.
    • otherCellLevelCharacteristicsNames

      public B otherCellLevelCharacteristicsNames(@Nullable List<String> otherCellLevelCharacteristicsNames)
      Name to use for the cell-level characteristics.

      Must match the number and order of CLCs in otherCellLevelCharacteristicsFile.

      Returns:
      this.
    • replaceExistingOtherCellLevelCharacteristics

      public B replaceExistingOtherCellLevelCharacteristics(boolean replaceExistingOtherCellLevelCharacteristics)
      If there are already other CLCs with the same names, replace them with the new ones.

      Note that other CLCs with a null name cannot be replaced.

      Returns:
      this.
    • inferSamplesFromCellIdsOverlap

      public B inferSamplesFromCellIdsOverlap(boolean inferSamplesFromCellIdsOverlap)
      When parsing cellTypeAssignmentFile and otherCellLevelCharacteristicsFile, use the overlap between the cell IDs from the file and those from the SingleCellDimension to infer sample associations.

      When this option is set, the sample ID column must be supplied for this strategy to be applied.

      Returns:
      this.
    • useCellIdsIfSampleNameIsMissing

      public B useCellIdsIfSampleNameIsMissing(boolean useCellIdsIfSampleNameIsMissing)
      When parsing cellTypeAssignmentFile and otherCellLevelCharacteristicsFile, allow for a missing sample_id column, in which case barcodes are used to infer the sample a cell belongs to. This strategy will not work in the case of a barcode collision.
      Returns:
      this.
    • ignoreUnmatchedCellIds

      public B ignoreUnmatchedCellIds(boolean ignoreUnmatchedCellIds)
      When parsing cellTypeAssignmentFile and otherCellLevelCharacteristicsFile, ignore cell IDs that cannot be matched to a sample.
      Returns:
      this.
    • markSingleCellTypeAssignmentAsPreferred

      public B markSingleCellTypeAssignmentAsPreferred(boolean markSingleCellTypeAssignmentAsPreferred)
      If only one CTA is present, mark it as preferred.
      Returns:
      this.
    • preferredCellTypeAssignmentName

      public B preferredCellTypeAssignmentName(@Nullable String preferredCellTypeAssignmentName)
      Name of the CTA to mark as preferred, or null to ignore.

      This setting overrides markSingleCellTypeAssignmentAsPreferred.

      Returns:
      this.
    • preferSinglePrecision

      public B preferSinglePrecision(boolean preferSinglePrecision)
      Prefer single-precision for storage, even if the data is available with double-precision.

      This reduces the size of vectors and thus the storage requirement.

      Returns:
      this.
    • skipTransformations

      public B skipTransformations(boolean skipTransformations)
      Skip single-cell data transformations, unless they are absolutely necessary.
      Returns:
      this.
    • transformExecutor

      public B transformExecutor(@Nullable ExecutorService transformExecutor)
      Executor service to use to transform single-cell data.
      Returns:
      this.
    • self

      protected abstract B self()
      Specified by:
      self in class SequencingDataLoaderConfig.SequencingDataLoaderConfigBuilder<C extends SingleCellDataLoaderConfig,B extends SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C,B>>
    • build

      public abstract C build()
      Specified by:
      build in class SequencingDataLoaderConfig.SequencingDataLoaderConfigBuilder<C extends SingleCellDataLoaderConfig,B extends SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C,B>>
    • toString

      public String toString()
      Overrides:
      toString in class SequencingDataLoaderConfig.SequencingDataLoaderConfigBuilder<C extends SingleCellDataLoaderConfig,B extends SingleCellDataLoaderConfig.SingleCellDataLoaderConfigBuilder<C,B>>